From 84b718f09596c8b1db80e264d771f57f479faf88 Mon Sep 17 00:00:00 2001 From: rockstardev Date: Sun, 10 Nov 2019 23:20:08 -0600 Subject: [PATCH] Recreating Bitcoin LND container --- Tools/recreate_bitcoin_lnd.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 Tools/recreate_bitcoin_lnd.sh diff --git a/Tools/recreate_bitcoin_lnd.sh b/Tools/recreate_bitcoin_lnd.sh new file mode 100755 index 0000000..5bed9ed --- /dev/null +++ b/Tools/recreate_bitcoin_lnd.sh @@ -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" \ No newline at end of file