healthcheck testing

This commit is contained in:
buanet
2020-07-27 21:46:15 +02:00
parent a2961abf67
commit f5f7e3f1ec
3 changed files with 51 additions and 5 deletions

View 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