cln: fix detecting open channels

This commit is contained in:
openoms 2021-05-23 23:00:02 +01:00
parent a0594098cd
commit e4df55ece6
No known key found for this signature in database
GPG key ID: 5BFB77609B081B65
2 changed files with 2 additions and 1 deletions

View file

@ -48,7 +48,7 @@ done
# check number of connected peers
echo "check for open channels"
if [ $LNTYPE = cln ];then
openChannels=$($lightningcli_alias listpeers | grep -c '"CHANNELD_NORMAL:Funding transaction locked. Channel announced."')
openChannels=$($lightningcli_alias listpeers | grep -c "CHANNELD_NORMAL")
elif [ $LNTYPE = lnd ];then
openChannels=$($lncli_alias listchannels 2>/dev/null | grep chan_id -c)
fi

View file

@ -160,6 +160,7 @@ always-use-proxy=true
" | sudo tee /home/bitcoin/.lightning/${prefix}config
else
echo "# The file /home/bitcoin/.lightning/${prefix}config is already present"
#TODO look for pluging configs and clear or install
fi
sudo chown -R bitcoin:bitcoin /mnt/hdd/app-data/.lightning
sudo chown -R bitcoin:bitcoin /home/bitcoin/