Skip to content

Commit

Permalink
Don't try and read network.xml if it doesn't exist (like on first run)
Browse files Browse the repository at this point in the history
  • Loading branch information
thespad committed May 18, 2024
1 parent 048fd11 commit 1c26852
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-jellyfin/data/check
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

PORT=$(xmlstarlet sel -T -t -v /NetworkConfiguration/HttpServerPortNumber /config/network.xml)
if [[ -f "/config/network.xml" ]]; then
PORT=$(xmlstarlet sel -T -t -v /NetworkConfiguration/HttpServerPortNumber /config/network.xml)
fi

if [[ $(curl -sL "http://localhost:${PORT:-8096}/health" 2>/dev/null) = "Healthy" ]]; then
exit 0
Expand Down

0 comments on commit 1c26852

Please sign in to comment.