mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-19 10:28:58 +01:00
id wallet exists unlock
This commit is contained in:
@@ -94,7 +94,7 @@ echo ""
|
|||||||
###### Instructions on Creating LND Wallet
|
###### Instructions on Creating LND Wallet
|
||||||
walletExists=$(sudo ls /mnt/hdd/lnd/data/chain/${network}/${chain}net/wallet.db 2>/dev/null | grep wallet.db -c)
|
walletExists=$(sudo ls /mnt/hdd/lnd/data/chain/${network}/${chain}net/wallet.db 2>/dev/null | grep wallet.db -c)
|
||||||
echo "walletExists(${walletExists})"
|
echo "walletExists(${walletExists})"
|
||||||
sleep 6
|
sleep 2
|
||||||
if [ ${walletExists} -eq 0 ]; then
|
if [ ${walletExists} -eq 0 ]; then
|
||||||
|
|
||||||
# delete old macaroons if exist
|
# delete old macaroons if exist
|
||||||
@@ -158,6 +158,11 @@ sleep 60
|
|||||||
echo ""
|
echo ""
|
||||||
echo "*** Copy LND Macaroons to user admin ***"
|
echo "*** Copy LND Macaroons to user admin ***"
|
||||||
macaroonExists=$(sudo -u bitcoin ls -la /home/bitcoin/.lnd/admin.macaroon | grep -c admin.macaroon)
|
macaroonExists=$(sudo -u bitcoin ls -la /home/bitcoin/.lnd/admin.macaroon | grep -c admin.macaroon)
|
||||||
|
if [ ${macaroonExists} -eq 0 ]; then
|
||||||
|
./AAunlock.sh
|
||||||
|
sleep 3
|
||||||
|
fi
|
||||||
|
macaroonExists=$(sudo -u bitcoin ls -la /home/bitcoin/.lnd/admin.macaroon | grep -c admin.macaroon)
|
||||||
if [ ${macaroonExists} -eq 0 ]; then
|
if [ ${macaroonExists} -eq 0 ]; then
|
||||||
sudo -u bitcoin ls -la /home/bitcoin/.lnd/admin.macaroon
|
sudo -u bitcoin ls -la /home/bitcoin/.lnd/admin.macaroon
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ echo "**************************************************************************
|
|||||||
while :
|
while :
|
||||||
do
|
do
|
||||||
chain="$(${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.chain')"
|
chain="$(${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.chain')"
|
||||||
lncli unlock
|
sudo -u bitcoin lncli unlock
|
||||||
sleep 4
|
sleep 4
|
||||||
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c unlock)
|
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c unlock)
|
||||||
if [ ${locked} -eq 0 ]; then
|
if [ ${locked} -eq 0 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user