File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,21 @@ if [ "${DB_PATH}" != "filebrowser.db" ]; then
2121 DB_FLAG=" -d ${DB_PATH} "
2222fi
2323
24+ if test -f ${DB_PATH} ; then
25+ printf " DB ${DB_PATH} is existing, skipping initializing"
26+ else
27+ printf " DB ${DB_PATH} not existing, initializing"
28+ filebrowser ${DB_FLAG} config init
29+ fi
30+
31+ printf " Setting baseurl to ${SERVER_BASE_PATH} "
32+ filebrowser config set --baseurl " ${SERVER_BASE_PATH} " ${DB_FLAG} > ${LOG_PATH} 2>&1
33+
2434printf " 📂 Serving $$ {ROOT_DIR} at http://localhost:${PORT} \n\n"
2535
2636printf " Running 'filebrowser --noauth --root $ROOT_DIR --port ${PORT} $$ {DB_FLAG}' \n\n"
2737
28- filebrowser --noauth --root $ROOT_DIR --port ${PORT} $$ {DB_FLAG} -b ${SERVER_BASE_PATH} > ${LOG_PATH} 2>&1 &
38+ filebrowser --noauth --root $ROOT_DIR --port ${PORT} $$ {DB_FLAG} -b ${SERVER_BASE_PATH} >> ${LOG_PATH} 2>&1 &
39+
2940
3041printf " 📝 Logs at ${LOG_PATH} \n\n"
You can’t perform that action at this time.
0 commit comments