mirror of
https://github.com/buanet/ioBroker.docker.git
synced 2026-01-07 08:22:55 +02:00
healthcheck testing
This commit is contained in:
15
amd64/scripts/healthcheck.sh
Normal file
15
amd64/scripts/healthcheck.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script checks health of running container
|
||||
|
||||
if [ "$(cat /opt/iobroker/.docker_config/.healthcheck)" == "starting" ] || [ "$(cat /opt/iobroker/.docker_config/.healthcheck)" == "maintenance" ]
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
if [ "ps -fe|grep "[i]obroker.js-controller"|awk '{print $2}'" != "" ]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 1
|
||||
Reference in New Issue
Block a user