Moving sh scripts related to LND into separate directory (#466)
* Moving sh scripts related to LND into separate directory * Updating permissions on tools, giving +x
This commit is contained in:
16
Tools/lnd/lnd_delete_tls.sh
Executable file
16
Tools/lnd/lnd_delete_tls.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
read -p "This script will delete LND's TLS certificate, so that's it's recreated on restart. Please keep in mind that you'll need to update external connections to LND that depend on TLS cert. Type 'yes' to confirm you want to proceed`echo $'\n> '`" yn
|
||||
if [ $yn != "yes" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
docker exec btcpayserver_lnd_bitcoin rm -rf /root/.lnd/tls.cert
|
||||
docker exec btcpayserver_lnd_bitcoin rm -rf /root/.lnd/tls.key
|
||||
|
||||
docker stop btcpayserver_lnd_bitcoin
|
||||
docker start btcpayserver_lnd_bitcoin
|
||||
|
||||
echo "LND TLS certificate recreated"
|
||||
30
Tools/lnd/lnd_recreate_volume.sh
Executable file
30
Tools/lnd/lnd_recreate_volume.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
read -p "This script will delete and recreate your LND Bitcoin container. YOU CAN'T UNDO THIS OPERATION, ALL FUNDS THAT YOU CURRENTLY HAVE ON THIS LND WILL BE LOST! Type 'yes' to proceed only after you've transfered all your funds from this LND instance `echo $'\n> '`" yn
|
||||
if [ $yn != "yes" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
read -p "Only proceed if you've removed all the funds from LND Bitcoin container! This LND instance will be completely deleted and all data from it unrecoverable. Type 'yes' to proceed only if you are 100% sure `echo $'\n> '`" yn
|
||||
if [ $yn != "yes" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
read -p "OK, last chance to abort. Type 'yes' to continue! `echo $'\n> '`" yn
|
||||
if [ $yn != "yes" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
../btcpay-down.sh
|
||||
|
||||
docker volume rm --force generated_lnd_bitcoin_datadir
|
||||
|
||||
# very old installations had production_lnd_bitcoin_datadir volume
|
||||
# https://github.com/btcpayserver/btcpayserver-docker/issues/272
|
||||
docker volume rm --force production_lnd_bitcoin_datadir
|
||||
|
||||
../btcpay-up.sh
|
||||
|
||||
echo "LND container recreated"
|
||||
Reference in New Issue
Block a user