Files
prind/docker/ustreamer/health.sh
Markus Küffner 9ef0e9df1a Implement Health checks (#178)
* add healthchecks to moonraker, klipper and ustreamer images
2024-11-12 08:33:24 +01:00

13 lines
306 B
Bash
Executable File

#!/bin/bash
state=$(curl -s localhost:8080/state)
ok=$(echo $state | jq -r .ok)
online=$(echo $state | jq -r .result.source.online)
if [ "$ok" == "true" ] && [ "$online" == "true" ]; then
## ustreamer is ok and source is online
exit 0
else
## ustreamer is not ok or source is not online
exit 1
fi