From 18f04a7d26186927f51f46354f3b2164a68f1b41 Mon Sep 17 00:00:00 2001 From: Andrew Kennedy Date: Wed, 24 Apr 2024 14:13:56 -0700 Subject: [PATCH] fix: handle quotes in healthcheck.sh (#3130) This file as is makes a value of `"localhost"` as the address in the .filebrowser.json file read in as `"localhost"` instead of `localhost`. These quotes break the curl command. Using `-r` with jq fixes this. --- healthcheck.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/healthcheck.sh b/healthcheck.sh index cea8a1cb..b8b50039 100644 --- a/healthcheck.sh +++ b/healthcheck.sh @@ -1,5 +1,5 @@ #!/bin/sh -PORT=${FB_PORT:-$(jq .port /.filebrowser.json)} -ADDRESS=${FB_ADDRESS:-$(jq .address /.filebrowser.json)} +PORT=${FB_PORT:-$(jq -r .port /.filebrowser.json)} +ADDRESS=${FB_ADDRESS:-$(jq -r .address /.filebrowser.json)} ADDRESS=${ADDRESS:-localhost} curl -f http://$ADDRESS:$PORT/health || exit 1