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.
This commit is contained in:
Andrew Kennedy 2024-04-19 02:06:25 -07:00 committed by GitHub
parent ae0af1f996
commit 46b1bd15dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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