From ca8d8cbe2d10285bd0559dcd39de420cd2dd37b9 Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Thu, 25 Apr 2019 03:16:55 +0200 Subject: [PATCH] exit on 3 wallet restarts --- home.admin/00raspiblitz.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/home.admin/00raspiblitz.sh b/home.admin/00raspiblitz.sh index c13ee87..5992240 100755 --- a/home.admin/00raspiblitz.sh +++ b/home.admin/00raspiblitz.sh @@ -239,10 +239,17 @@ To run a BACKUP of funds & channels first is recommended. # give autounlock 5 min after startup to react sleep 1 else - /home/admin/AAunlockLND.sh - echo "Starting up Wallet ..." - sleep 6 - echo "Please Wait ... update to next screen can be slow" + # check how many times LND was restarted + source <(sudo /home/admin/config.scripts/blitz.statusscan.sh) + if [ ${startcountLightning} -lt 3 ]; then + /home/admin/AAunlockLND.sh + echo "Starting up Wallet ... (10sec)" + sleep 10 + echo "please wait ... update to next screen can be slow" + else + /home/admin/80scanLND.sh error-report + exit 0 + fi fi fi lndSynced=$(sudo -u bitcoin /usr/local/bin/lncli --chain=${network} --network=${chain}net getinfo 2>/dev/null | jq -r '.synced_to_chain' | grep -c true)