# close id [unilateraltimeout] [destination] [fee_negotiation_step] [*wrong_funding*]
echo"$lightningcli_alias close $i 30;"
done
}
command=$(cln_closeall_command)
# to run
function cln_closeall {
for i in $peerlist;do
# close id [unilateraltimeout] [destination] [fee_negotiation_step] [*wrong_funding*]
lightningcli_alias close $i30
done
}
elif[$LNTYPE= lnd ];then
# precheck: AutoPilot
if["${autoPilot}"="on"];then
dialog --title 'Info' --msgbox 'You need to turn OFF the LND AutoPilot first,\nso that closed channels are not opening up again.\nYou find the AutoPilot -----> SERVICES section'755
echo"# FAIL PRECHECK - '${netprefix}lightning-cli getinfo' blockheight is different from '${netprefix}bitcoind getblockchaininfo' - wait until chain is sync "
elif[$LNTYPE= lnd ];then
echo"# FAIL PRECHECK - ${netprefix}lncli getinfo shows 'synced_to_chain': false - wait until chain is sync "