From a54802070f991e3458fcb07a32101bf78f4ae17b Mon Sep 17 00:00:00 2001 From: rootzoll Date: Tue, 31 Jul 2018 21:43:57 +0200 Subject: [PATCH] fix issue #27 --- home.admin/70initLND.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/home.admin/70initLND.sh b/home.admin/70initLND.sh index 3930fb8..2c285ad 100755 --- a/home.admin/70initLND.sh +++ b/home.admin/70initLND.sh @@ -169,14 +169,23 @@ if [ ${lndSyncing} -eq 0 ]; then echo "OK - wait for LND to be synced" while : do + # show sync status ./80scanLND.sh sleep 3 + # break loop when synced lndSyncing=$(sudo -u bitcoin lncli getinfo | jq -r '.synced_to_chain' | grep -c true) if [ ${lndSyncing} -eq 1 ]; then break fi + + # break loop when wallet is locked + locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c unlock) + if [ ${locked} -eq 1 ]; then + break + fi + done clear else