Skip to content

Commit

Permalink
Don't extract port from non-existent file
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad committed Dec 30, 2023
1 parent 590e1f9 commit 197fbe6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-sonarr/data/check
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

PORT=$(xmlstarlet sel -T -t -v /Config/Port /config/config.xml)
if [[ -f /config/config.xml ]]; then
PORT=$(xmlstarlet sel -T -t -v /Config/Port /config/config.xml)
fi

if [[ $(curl -sL "http://localhost:${PORT:-8989}/ping" | jq -r '.status' 2>/dev/null) = "OK" ]]; then
exit 0
Expand Down

0 comments on commit 197fbe6

Please sign in to comment.