bugfix: failed to set server_base_path if db is not existing
On the first start, the DB do not exist and the "filebrowser config set --baseurl" will failed. filebrowser was starting with the wrong baseurl (subdomain=false). it starts correctly on the second try if the db was persisted. this fix set the correct baseurl even if the db was not existing
This commit is contained in:
@@ -21,13 +21,11 @@ if [ "${DB_PATH}" != "filebrowser.db" ]; then
|
|||||||
DB_FLAG=" -d ${DB_PATH}"
|
DB_FLAG=" -d ${DB_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set baseurl to be able to run if sudomain=false; if subdomain=true the SERVER_BASE_PATH value will be ""
|
|
||||||
filebrowser config set --baseurl "${SERVER_BASE_PATH}"$${DB_FLAG} > ${LOG_PATH} 2>&1
|
|
||||||
|
|
||||||
printf "📂 Serving $${ROOT_DIR} at http://localhost:${PORT} \n\n"
|
printf "📂 Serving $${ROOT_DIR} at http://localhost:${PORT} \n\n"
|
||||||
|
|
||||||
printf "Running 'filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG}' \n\n"
|
printf "Running 'filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG} -b ${SERVER_BASE_PATH}' \n\n"
|
||||||
|
|
||||||
|
filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG} -b ${SERVER_BASE_PATH} > ${LOG_PATH} 2>&1 &
|
||||||
|
|
||||||
filebrowser --noauth --root $ROOT_DIR --port ${PORT}$${DB_FLAG} > ${LOG_PATH} 2>&1 &
|
|
||||||
|
|
||||||
printf "📝 Logs at ${LOG_PATH} \n\n"
|
printf "📝 Logs at ${LOG_PATH} \n\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user