Browse Source

detect open channels on switch

#146
rootzoll 6 years ago
parent
commit
6f6051c16b
  1. 2
      home.admin/95switchMainTest.sh

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=$(lncli listchannels 2>/dev/null | grep chan_id -c)
openChannels=$(sudo -u bitcoin lncli listchannels 2>/dev/null | grep chan_id -c)
if [ ${openChannels} -gt 0 ]; then
echo "FAIL - You have still open channels and could loose funds !! - close those first with lncli closeallchannels"
exit 1

Loading…
Cancel
Save