Carry on if ln command fail on start

pull/5291/head
outlook84 2025-07-13 11:37:52 +00:00
parent e6ffb65374
commit d049ae8f38
2 changed files with 8 additions and 3 deletions

View File

@ -2,8 +2,13 @@
set -e
PORT=${FB_PORT:-$(cat /tmp/FB_CONFIG | sh /JSON.sh | grep '\["port"\]' | awk '{print $2}')}
ADDRESS=${FB_ADDRESS:-$(cat /tmp/FB_CONFIG | sh /JSON.sh | grep '\["address"\]' | awk '{print $2}' | sed 's/"//g')}
CONFIG_FILE="/tmp/FB_CONFIG"
if [ ! -f "/tmp/FB_CONFIG" ]; then
CONFIG_FILE="/config/settings.json"
fi
PORT=${FB_PORT:-$(cat $CONFIG_FILE | sh /JSON.sh | grep '\["port"\]' | awk '{print $2}')}
ADDRESS=${FB_ADDRESS:-$(cat $CONFIG_FILE | sh /JSON.sh | grep '\["address"\]' | awk '{print $2}' | sed 's/"//g')}
ADDRESS=${ADDRESS:-localhost}
wget -q --spider http://$ADDRESS:$PORT/health || exit 1

View File

@ -33,6 +33,6 @@ if [ -z "$config_file" ]; then
fi
# Create a symlink to the config file for compatibility with the healthcheck script
ln -s "$config_file" /tmp/FB_CONFIG
ln -s "$config_file" /tmp/FB_CONFIG || true
exec filebrowser "$@"