You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
915 B

7 years ago
#!/bin/sh
7 years ago
# load network
network=`cat .network`
7 years ago
7 years ago
echo ""
echo "****************************************************************************"
echo "Unlock LND Wallet --> lncli unlock"
echo "****************************************************************************"
echo "HELP: Enter your PASSWORD C"
echo "****************************************************************************"
while :
do
chain="$(${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.chain')"
sudo -u bitcoin /usr/local/bin/lncli unlock
7 years ago
sleep 4
7 years ago
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log | grep -c unlock)
7 years ago
if [ ${locked} -eq 0 ]; then
break
fi
echo ""
echo "network(${network}) chain(${chain})"
sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log
7 years ago
echo "Wallet still locked - please try again or Cancel with CTRL+C"
done