mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-11 05:09:40 +02:00
fix lndunlock for macaroon reset
This commit is contained in:
parent
738d50f2ab
commit
5cdd7e5370
@ -15,12 +15,12 @@ passwordC="$1"
|
||||
# check if wallet is already unlocked
|
||||
echo "# checking LND wallet ... (can take some time)"
|
||||
walletLocked=$(sudo -u bitcoin /usr/local/bin/lncli --chain=${network} --network=${chain}net getinfo 2>&1 | grep -c unlock)
|
||||
if [ ${walletLocked} -eq 0 ]; then
|
||||
macaroonsMissing=$(sudo -u bitcoin /usr/local/bin/lncli --chain=${network} --network=${chain}net getinfo 2>&1 | grep -c "unable to read macaroon")
|
||||
if [ ${walletLocked} -eq 0 ] && [ ${macaroonsMissing} -eq 0 ]; then
|
||||
echo "# OK LND wallet was already unlocked"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# check if LND is below 0.10 (has no STDIN password option)
|
||||
fallback=0
|
||||
source <(/home/admin/config.scripts/lnd.update.sh info)
|
||||
|
Loading…
x
Reference in New Issue
Block a user