add logging to script

This commit is contained in:
2025-12-17 11:36:44 -06:00
parent c89f3ced65
commit fc478400c6

View File

@@ -14,9 +14,11 @@ data:
echo "curl could not be found, installing"; echo "curl could not be found, installing";
apk add curl; apk add curl;
fi; fi;
echo ">> Setting port to random ...";
curl -i -X POST --silent --write-out '%{http_code}' -d "json={\"random_port\": \"true\"}" "http://localhost:8080/api/v2/app/setPreferences"; curl -i -X POST --silent --write-out '%{http_code}' -d "json={\"random_port\": \"true\"}" "http://localhost:8080/api/v2/app/setPreferences";
sleep 10 echo ">> Sleeping for changes to take effect";
echo "updating port with $1"; sleep 10;
echo ">> Updating port with $1 ...";
curl -i -X POST --silent --write-out '%{http_code}' -d "json={\"listen_port\": \"${1}\"}" "http://localhost:8080/api/v2/app/setPreferences"; curl -i -X POST --silent --write-out '%{http_code}' -d "json={\"listen_port\": \"${1}\"}" "http://localhost:8080/api/v2/app/setPreferences";
--- ---