mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-19 09:50:19 +01:00
36 lines
1.3 KiB
Bash
Executable File
36 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# load raspiblitz config data (with backup from old config)
|
|
source /home/admin/raspiblitz.info
|
|
source /mnt/hdd/raspiblitz.conf
|
|
if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
|
|
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
|
|
if [ ${#chain} -eq 0 ]; then
|
|
echo "gathering chain info ... please wait"
|
|
chain=$(${network}-cli getblockchaininfo | jq -r '.chain')
|
|
fi
|
|
|
|
clear
|
|
echo ""
|
|
echo "****************************************************************************"
|
|
echo "Unlock LND Wallet --> lncli --chain=${network} unlock"
|
|
echo "****************************************************************************"
|
|
echo "HELP: Enter your PASSWORD C"
|
|
echo "You may wait some seconds until you get asked for password."
|
|
echo "****************************************************************************"
|
|
while :
|
|
do
|
|
sudo -u bitcoin /usr/local/bin/lncli --chain=${network} unlock
|
|
sleep 4
|
|
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null | grep -c unlock)
|
|
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
|
|
echo "Wallet still locked - please try again or"
|
|
echo "Cancel with CTRL+C - back to setup with command: raspiblitz"
|
|
done
|