mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-13 06:09:47 +02:00
detect wallet locked during setup
This commit is contained in:
parent
1a1d3f0226
commit
86619934d1
@ -21,7 +21,12 @@ lndRunning=$(systemctl status lnd.service 2>/dev/null | grep -c running)
|
||||
if [ ${lndRunning} -eq 1 ]; then
|
||||
|
||||
# check if LND is locked
|
||||
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null | grep -c unlock)
|
||||
walletExists=$(sudo ls /mnt/hdd/lnd/data/chain/${network}/${chain}net/wallet.db 2>/dev/null | grep wallet.db -c)
|
||||
locked=0
|
||||
# only when a wallet exists - it can be locked
|
||||
if [ ${walletExists} -eq 1 ];then
|
||||
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null | grep -c unlock)
|
||||
fi
|
||||
if [ ${locked} -gt 0 ]; then
|
||||
# LND wallet is locked
|
||||
./AAunlockLND.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user