Don't try and read config.xml if it doesn't exist yet

This commit is contained in:
thespad
2024-05-26 14:42:21 +01:00
parent 98e66eea1b
commit 86a3af38fd
@@ -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:-7878}/ping" | jq -r '.status' 2>/dev/null) = "OK" ]]; then
exit 0