From c0dd8fad2ea2b684c644fdd13043f07ce08a5884 Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Tue, 16 Apr 2019 02:57:18 +0100 Subject: [PATCH] restore LND backup --- home.admin/70initLND.sh | 8 ++++++++ home.admin/config.scripts/lnd.rescue.sh | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/home.admin/70initLND.sh b/home.admin/70initLND.sh index 13350dcf2..f02ece80b 100755 --- a/home.admin/70initLND.sh +++ b/home.admin/70initLND.sh @@ -209,11 +209,19 @@ if [ ${walletExists} -eq 0 ]; then if [ "${CHOICE}" == "ONLYSEED" ]; then echo "TODO: ONLYSEED" exit 1 + elif [ "${CHOICE}" == "SEED+SCB" ]; then echo "TODO: SEED+SCB" exit 1 + elif [ "${CHOICE}" == "LNDRESCUE" ]; then sudo /home/admin/config.scripts/lnd.rescue.sh restore + echo "" + echo "PRESS ENTER to continue." + read key + /home/admin/70initLND.sh + exit 1 + else echo "CANCEL" /home/admin/70initLND.sh diff --git a/home.admin/config.scripts/lnd.rescue.sh b/home.admin/config.scripts/lnd.rescue.sh index a97334de3..3edbdc1f9 100755 --- a/home.admin/config.scripts/lnd.rescue.sh +++ b/home.admin/config.scripts/lnd.rescue.sh @@ -66,9 +66,10 @@ elif [ ${mode} = "restore" ]; then echo "**************************" echo "* UPLOAD THE BACKUP FILE *" echo "**************************" - echo echo "If you have a lnd-rescue backup file on your laptop you can now" - echo "upload it and restore the your old LND state." + echo "upload it and restore the your latest LND state." + echo + echo "CAUTION: Dont restore old LND states - risk of loosing funds!" echo echo "To make upload open a new terminal on your laptop," echo "change into the directory where your lnd-rescue file is and" @@ -76,7 +77,6 @@ elif [ ${mode} = "restore" ]; then echo "scp -r ./lnd-rescue-*.tar.gz admin@${localip}:/home/admin/" echo "" echo "Use password A to authenticate file transfere." - echo echo "PRESS ENTER when upload is done. Use CTRL-C to abort." fi if [ ${countZips} -gt 1 ]; then @@ -143,7 +143,7 @@ elif [ ${mode} = "restore" ]; then echo echo "DONE - please check if LND starts up correctly with restored state and funds." - echo "Keep in mind that some channels got forced closed by channel partners in the meanwhile." + echo "Keep in mind that some channels maybe forced closed in the meanwhile." echo else