From d049ae8f38d4055481438954871720273d0d6caf Mon Sep 17 00:00:00 2001 From: outlook84 <96007761+outlook84@users.noreply.github.com> Date: Sun, 13 Jul 2025 11:37:52 +0000 Subject: [PATCH] Carry on if ln command fail on start --- docker/alpine/healthcheck.sh | 9 +++++++-- docker/alpine/init.sh | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docker/alpine/healthcheck.sh b/docker/alpine/healthcheck.sh index 70e71bf6..297339d5 100644 --- a/docker/alpine/healthcheck.sh +++ b/docker/alpine/healthcheck.sh @@ -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 \ No newline at end of file diff --git a/docker/alpine/init.sh b/docker/alpine/init.sh index 5ea2cf6e..adbf160f 100755 --- a/docker/alpine/init.sh +++ b/docker/alpine/init.sh @@ -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 "$@" \ No newline at end of file