diff --git a/home.admin/config.scripts/bonus.btc-rpc-explorer.sh b/home.admin/config.scripts/bonus.btc-rpc-explorer.sh index f7b31969..e0d486a5 100644 --- a/home.admin/config.scripts/bonus.btc-rpc-explorer.sh +++ b/home.admin/config.scripts/bonus.btc-rpc-explorer.sh @@ -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