id wallet exists unlock

This commit is contained in:
rootzoll 2018-08-09 12:04:31 +02:00
parent 16c5020b75
commit 8c3878b326
2 changed files with 7 additions and 2 deletions

View File

@ -94,7 +94,7 @@ echo ""
###### 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)
echo "walletExists(${walletExists})"
sleep 6
sleep 2
if [ ${walletExists} -eq 0 ]; then
# delete old macaroons if exist
@ -158,6 +158,11 @@ sleep 60
echo ""
echo "*** Copy LND Macaroons to user admin ***"
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
sudo -u bitcoin ls -la /home/bitcoin/.lnd/admin.macaroon
echo ""

View File

@ -12,7 +12,7 @@ echo "**************************************************************************
while :
do
chain="$(${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.chain')"
lncli unlock
sudo -u bitcoin lncli unlock
sleep 4
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c unlock)
if [ ${locked} -eq 0 ]; then