From 46b1bd15ddb2e51115e4c208c9193bbd77b4edd9 Mon Sep 17 00:00:00 2001 From: Andrew Kennedy Date: Fri, 19 Apr 2024 02:06:25 -0700 Subject: [PATCH] Handle quotes in healthcheck.sh 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