Browse Source

lncli path correction

#146
rootzoll 6 years ago
parent
commit
f0c9978547
  1. 2
      home.admin/00infoLCD.sh
  2. 2
      home.admin/00mainMenu.sh
  3. 2
      home.admin/10setupBlitz.sh
  4. 8
      home.admin/70initLND.sh
  5. 2
      home.admin/95switchMainTest.sh
  6. 2
      home.admin/AAunlockLND.sh
  7. 2
      home.admin/BBcloseAllChannels.sh
  8. 2
      home.admin/BBcreateInvoice.sh
  9. 2
      home.admin/BBpayInvoice.sh

2
home.admin/00infoLCD.sh

@ -54,7 +54,7 @@ if [ "$USER" = "pi" ]; then
elif [ ${setupStep} -lt 100 ]; then
# setup process init is done and not finished
lndSyncing=$(sudo -u bitcoin lncli getinfo 2>/dev/null | jq -r '.synced_to_chain' | grep -c false)
lndSyncing=$(sudo -u bitcoin /usr/local/gocode/bin/lncli getinfo 2>/dev/null | jq -r '.synced_to_chain' | grep -c false)
chain=$(sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo 2>/dev/null | jq -r '.chain')
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null | grep -c unlock)

2
home.admin/00mainMenu.sh

@ -77,7 +77,7 @@ else
lnchannels "Lightning Channel List")
# Depending Options
openChannels=$(sudo -u bitcoin lncli listchannels 2>/dev/null | grep chan_id -c)
openChannels=$(sudo -u bitcoin /usr/local/gocode/bin/lncli listchannels 2>/dev/null | grep chan_id -c)
if [ ${openChannels} -gt 0 ]; then
OPTIONS+=(CLOSEALL "Close all open Channels")
fi

2
home.admin/10setupBlitz.sh

@ -15,7 +15,7 @@ if [ ${lndRunning} -eq 1 ]; then
chain=$(${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo 2>/dev/null | jq -r '.chain')
locked=$(sudo tail -n 1 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null | grep -c unlock)
lndSyncing=$(sudo -u bitcoin lncli getinfo | jq -r '.synced_to_chain' 2>/dev/null | grep -c false)
lndSyncing=$(sudo -u bitcoin /usr/local/gocode/bin/lncli getinfo | jq -r '.synced_to_chain' 2>/dev/null | grep -c false)
if [ ${locked} -gt 0 ]; then
# LND wallet is locked
./AAunlockLND.sh

8
home.admin/70initLND.sh

@ -84,6 +84,8 @@ lndRunning=$(systemctl status lnd.service | grep -c running)
if [ ${lndRunning} -eq 0 ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "FAIL - LND is not running"
echo "check: systemctl status lnd.service"
echo "check: sudo journalctl -f"
echo "recheck with original tutorial -->"
echo "https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_40_lnd.md"
exit 1
@ -125,7 +127,7 @@ Press OK and follow the 'Helping Instructions'.
# execute command and monitor error
_error="./.error.out"
sudo -u bitcoin lncli create 2>$_error
sudo -u bitcoin /usr/local/gocode/bin/lncli create 2>$_error
error=`cat ${_error}`
if [ ${#error} -gt 0 ]; then
@ -198,7 +200,7 @@ fi
echo ""
echo "*** Check LND Sync ***"
item=0
lndSyncing=$(sudo -u bitcoin lncli getinfo | jq -r '.synced_to_chain' | grep -c true)
lndSyncing=$(sudo -u bitcoin /usr/local/gocode/bin/lncli getinfo | jq -r '.synced_to_chain' | grep -c true)
if [ ${lndSyncing} -eq 0 ]; then
echo "OK - wait for LND to be synced"
while :
@ -209,7 +211,7 @@ if [ ${lndSyncing} -eq 0 ]; then
sleep 3
# break loop when synced
lndSyncing=$(sudo -u bitcoin lncli getinfo | jq -r '.synced_to_chain' | grep -c true)
lndSyncing=$(sudo -u bitcoin /usr/local/gocode/bin/lncli getinfo | jq -r '.synced_to_chain' | grep -c true)
if [ ${lndSyncing} -eq 1 ]; then
break
fi

2
home.admin/95switchMainTest.sh

@ -61,7 +61,7 @@ lndInstalled=$(systemctl status lnd.service | grep loaded -c)
if [ ${lndInstalled} -gt 0 ]; then
echo "check for open channels"
openChannels=$(sudo -u bitcoin lncli listchannels 2>/dev/null | grep chan_id -c)
openChannels=$(sudo -u bitcoin /usr/local/gocode/bin/lncli listchannels 2>/dev/null | grep chan_id -c)
if [ ${openChannels} -gt 0 ]; then
echo ""
echo "!!!!!!!!!!!!!!!!!!!"

2
home.admin/AAunlockLND.sh

@ -12,7 +12,7 @@ echo "**************************************************************************
while :
do
chain="$(${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq -r '.chain')"
sudo -u bitcoin lncli unlock
sudo -u bitcoin /usr/local/gocode/bin/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

2
home.admin/BBcloseAllChannels.sh

@ -32,7 +32,7 @@ echo ""
echo "OK"
sleep 2
openChannels=$(sudo -u bitcoin lncli listchannels 2>/dev/null | grep chan_id -c)
openChannels=$(sudo -u bitcoin /usr/local/gocode/bin/lncli listchannels 2>/dev/null | grep chan_id -c)
if [ ${openChannels} -gt 0 ]; then
echo ""
echo "*******************"

2
home.admin/BBcreateInvoice.sh

@ -22,7 +22,7 @@ fi
# check number of connected peers
echo "check for open channels"
openChannels=$(sudo -u bitcoin lncli listchannels 2>/dev/null | grep chan_id -c)
openChannels=$(sudo -u bitcoin /usr/local/gocode/bin/lncli listchannels 2>/dev/null | grep chan_id -c)
if [ ${openChannels} -eq 0 ]; then
echo ""
echo "!!!!!!!!!!!!!!!!!!!"

2
home.admin/BBpayInvoice.sh

@ -23,7 +23,7 @@ fi
# check number of connected peers
echo "check for open channels"
openChannels=$(sudo -u bitcoin lncli listchannels 2>/dev/null | grep chan_id -c)
openChannels=$(sudo -u bitcoin /usr/local/gocode/bin/lncli listchannels 2>/dev/null | grep chan_id -c)
if [ ${openChannels} -eq 0 ]; then
echo ""
echo "!!!!!!!!!!!!!!!!!!!"

Loading…
Cancel
Save