Don't try and read network.xml if it doesn't exist (like on first run)

This commit is contained in:
thespad
2024-05-18 19:35:45 +01:00
parent 72c8f9a3b4
commit ec28cb1455

View File

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