Browse Source

fixes for autounlock

dev
/geco 6 years ago
parent
commit
bbe8a2601e
  1. 4
      home.admin/00infoLCD.sh
  2. 2
      home.admin/80scanLND.sh
  3. 6
      home.admin/_background.sh

4
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}

2
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")

6
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

Loading…
Cancel
Save