mirror of
https://github.com/Retropex/raspiblitz.git
synced 2025-06-02 15:32:36 +02:00
#920 detect service dead
This commit is contained in:
parent
4b35eb09e1
commit
4766689ded
@ -29,6 +29,13 @@ if [ "$1" = "status" ]; then
|
|||||||
echo "isIndexed=${isIndexed}"
|
echo "isIndexed=${isIndexed}"
|
||||||
echo "indexInfo='${indexInfo}'"
|
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
|
else
|
||||||
echo "configured=0"
|
echo "configured=0"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user