From 197fbe6c71902bb52acdf3704eeab1f335c7dff9 Mon Sep 17 00:00:00 2001 From: TheSpad Date: Sat, 30 Dec 2023 15:36:38 +0000 Subject: [PATCH] Don't extract port from non-existent file --- root/etc/s6-overlay/s6-rc.d/svc-sonarr/data/check | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/svc-sonarr/data/check b/root/etc/s6-overlay/s6-rc.d/svc-sonarr/data/check index ad7e6e93..bd10af24 100755 --- a/root/etc/s6-overlay/s6-rc.d/svc-sonarr/data/check +++ b/root/etc/s6-overlay/s6-rc.d/svc-sonarr/data/check @@ -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