From bbe8a2601e84a99f6fa50cb3dd89fe080d4c232a Mon Sep 17 00:00:00 2001 From: /geco Date: Sun, 23 Dec 2018 14:20:13 +0100 Subject: [PATCH] fixes for autounlock --- home.admin/00infoLCD.sh | 4 ++-- home.admin/80scanLND.sh | 2 +- home.admin/_background.sh | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/home.admin/00infoLCD.sh b/home.admin/00infoLCD.sh index c842e27..10bbd90 100755 --- a/home.admin/00infoLCD.sh +++ b/home.admin/00infoLCD.sh @@ -179,8 +179,8 @@ while : l3="Use Password C to unlock\n" fi if [ "${autoUnlock}" = "on" ]; then - l3="Waiting for AUTO-UNLOCK .." - l2="ssh admin@${localip}" + l2="ssh admin@${localip}\n" + l3="Waiting for AUTO-UNLOCK" fi boxwidth=$((${#localip} + 24)) dialog --backtitle "RaspiBlitz ${codeVersion} (${localip}) - ${hostname}" --infobox "$l1$l2$l3" 5 ${boxwidth} diff --git a/home.admin/80scanLND.sh b/home.admin/80scanLND.sh index 3835b0b..7e79674 100755 --- a/home.admin/80scanLND.sh +++ b/home.admin/80scanLND.sh @@ -60,7 +60,7 @@ else heigh=7 # check if wallet has any UTXO # reason see: https://github.com/lightningnetwork/lnd/issues/2326 - txlines=$(sudo -u bitcoin lncli listchaintxns | wc -l) + txlines=$(sudo -u bitcoin lncli listchaintxns 2>/dev/null | wc -l) # has just 4 lines if empty if [ ${txlines} -eq 4 ]; then infoStr=$(echo " Lightning ${action} Blockchain\n Progress: ${scanstate}\n Will rescan every start until funding available. \n ssh admin@${localip}\n Password A") diff --git a/home.admin/_background.sh b/home.admin/_background.sh index 2bba7a2..dad10d0 100644 --- a/home.admin/_background.sh +++ b/home.admin/_background.sh @@ -3,7 +3,6 @@ # This script runs on after start in background # as a service and gets restarted on failure # it runs ALMOST every seconds -# DEBUG: sudo journalctl -f -u background # INFOFILE - state data from bootstrap infoFile="/home/admin/raspiblitz.info" @@ -11,6 +10,9 @@ infoFile="/home/admin/raspiblitz.info" # CONFIGFILE - configuration of RaspiBlitz configFile="/mnt/hdd/raspiblitz.conf" +# LOGS see: sudo journalctl -f -u background +echo "_background.sh STARTED" + # Check if HDD contains configuration configExists=$(ls ${configFile} | grep -c '.conf') if [ ${configExists} -eq 1 ]; then @@ -126,6 +128,8 @@ do -X POST -d "{\"wallet_password\": \"$(cat /root/lnd.autounlock.pwd | tr -d '\n' | base64 -w0)\"}" \ https://localhost:8080/v1/unlockwallet > /dev/null 2>&1 + else + echo "lncli says not locked" fi fi fi