lncli path correction

This commit is contained in:
rootzoll
2018-08-20 02:08:44 +02:00
parent 18d8c3e02b
commit f0c9978547
9 changed files with 13 additions and 11 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 "!!!!!!!!!!!!!!!!!!!"

View File

@@ -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

View File

@@ -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 "*******************"

View File

@@ -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 "!!!!!!!!!!!!!!!!!!!"

View File

@@ -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 "!!!!!!!!!!!!!!!!!!!"