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.

35 lines
1.2 KiB

6 years ago
#!/bin/bash
7 years ago
6 years ago
# load raspiblitz config data (with backup from old config)
source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf
6 years ago
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
6 years ago
if [ ${#chain} -eq 0 ]; then
echo "gathering chain info ... please wait"
6 years ago
chain=$(${network}-cli getblockchaininfo | jq -r '.chain')
fi
7 years ago
clear
7 years ago
echo ""
echo "****************************************************************************"
echo "Unlock LND Wallet --> lncli --chain=${network} unlock"
7 years ago
echo "****************************************************************************"
echo "HELP: Enter your PASSWORD C"
6 years ago
echo "You may wait some seconds until you get asked for password."
7 years ago
echo "****************************************************************************"
while :
do
sudo -u bitcoin /usr/local/bin/lncli --chain=${network} 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