#920 detect service dead

This commit is contained in:
rootzoll 2020-01-22 11:37:42 +01:00
parent 4b35eb09e1
commit 4766689ded

View file

@ -29,6 +29,13 @@ if [ "$1" = "status" ]; then
echo "isIndexed=${isIndexed}"
echo "indexInfo='${indexInfo}'"
# check for error
isDead=$(sudo systemctl status btc-rpc-explorer | grep -c 'inactive (dead)')
if [ ${isDead} -eq 1 ]; then
echo "error='Service Failed'"
exit 1
fi
else
echo "configured=0"
fi