2020-08-11 14:25:12 +02:00
|
|
|
#!/bin/bash
|
2022-02-10 04:25:14 +01:00
|
|
|
|
|
|
|
./docker-customer-lncli.sh closeallchannels > /dev/null
|
|
|
|
./docker-merchant-lncli.sh closeallchannels > /dev/null
|
|
|
|
./docker-bitcoin-generate.sh 10 > /dev/null
|
2020-08-11 14:25:12 +02:00
|
|
|
|
|
|
|
channels=$(./docker-merchant-lightning-cli.sh listchannels | jq -cr '.channels | map(.short_channel_id) | unique')
|
|
|
|
|
|
|
|
for chanid in $(echo "${channels}" | jq -cr '.[]')
|
|
|
|
do
|
2022-02-10 04:25:14 +01:00
|
|
|
./docker-merchant-lightning-cli.sh close $chanid > /dev/null
|
2020-08-11 14:25:12 +02:00
|
|
|
done
|
2022-02-10 04:25:14 +01:00
|
|
|
./docker-bitcoin-generate.sh 10 > /dev/null
|
|
|
|
|
|
|
|
printf "All channels closed!\r\n"
|