mirror of
https://github.com/Retropex/raspiblitz.git
synced 2025-05-28 13:02:30 +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 "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
|
||||
|
Loading…
Reference in New Issue
Block a user