mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-28 04:26:28 +02:00
fixes for autounlock
This commit is contained in:
@@ -179,8 +179,8 @@ while :
|
|||||||
l3="Use Password C to unlock\n"
|
l3="Use Password C to unlock\n"
|
||||||
fi
|
fi
|
||||||
if [ "${autoUnlock}" = "on" ]; then
|
if [ "${autoUnlock}" = "on" ]; then
|
||||||
l3="Waiting for AUTO-UNLOCK .."
|
l2="ssh admin@${localip}\n"
|
||||||
l2="ssh admin@${localip}"
|
l3="Waiting for AUTO-UNLOCK"
|
||||||
fi
|
fi
|
||||||
boxwidth=$((${#localip} + 24))
|
boxwidth=$((${#localip} + 24))
|
||||||
dialog --backtitle "RaspiBlitz ${codeVersion} (${localip}) - ${hostname}" --infobox "$l1$l2$l3" 5 ${boxwidth}
|
dialog --backtitle "RaspiBlitz ${codeVersion} (${localip}) - ${hostname}" --infobox "$l1$l2$l3" 5 ${boxwidth}
|
||||||
|
@@ -60,7 +60,7 @@ else
|
|||||||
heigh=7
|
heigh=7
|
||||||
# check if wallet has any UTXO
|
# check if wallet has any UTXO
|
||||||
# reason see: https://github.com/lightningnetwork/lnd/issues/2326
|
# 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
|
# has just 4 lines if empty
|
||||||
if [ ${txlines} -eq 4 ]; then
|
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")
|
infoStr=$(echo " Lightning ${action} Blockchain\n Progress: ${scanstate}\n Will rescan every start until funding available. \n ssh admin@${localip}\n Password A")
|
||||||
|
@@ -3,7 +3,6 @@
|
|||||||
# This script runs on after start in background
|
# This script runs on after start in background
|
||||||
# as a service and gets restarted on failure
|
# as a service and gets restarted on failure
|
||||||
# it runs ALMOST every seconds
|
# it runs ALMOST every seconds
|
||||||
# DEBUG: sudo journalctl -f -u background
|
|
||||||
|
|
||||||
# INFOFILE - state data from bootstrap
|
# INFOFILE - state data from bootstrap
|
||||||
infoFile="/home/admin/raspiblitz.info"
|
infoFile="/home/admin/raspiblitz.info"
|
||||||
@@ -11,6 +10,9 @@ infoFile="/home/admin/raspiblitz.info"
|
|||||||
# CONFIGFILE - configuration of RaspiBlitz
|
# CONFIGFILE - configuration of RaspiBlitz
|
||||||
configFile="/mnt/hdd/raspiblitz.conf"
|
configFile="/mnt/hdd/raspiblitz.conf"
|
||||||
|
|
||||||
|
# LOGS see: sudo journalctl -f -u background
|
||||||
|
echo "_background.sh STARTED"
|
||||||
|
|
||||||
# Check if HDD contains configuration
|
# Check if HDD contains configuration
|
||||||
configExists=$(ls ${configFile} | grep -c '.conf')
|
configExists=$(ls ${configFile} | grep -c '.conf')
|
||||||
if [ ${configExists} -eq 1 ]; then
|
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)\"}" \
|
-X POST -d "{\"wallet_password\": \"$(cat /root/lnd.autounlock.pwd | tr -d '\n' | base64 -w0)\"}" \
|
||||||
https://localhost:8080/v1/unlockwallet > /dev/null 2>&1
|
https://localhost:8080/v1/unlockwallet > /dev/null 2>&1
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "lncli says not locked"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user