Recreating Bitcoin LND container

This commit is contained in:
rockstardev
2019-11-10 23:20:08 -06:00
parent 20e17cd7cc
commit 84b718f095

26
Tools/recreate_bitcoin_lnd.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -e
read -p "This script will delete and recreate your LND Bitcoin container. THIS OPERATION IS NOT UNDOABLE, 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
../btcpay-up.sh
echo "LND container recreated"