diff --git a/home.admin/00raspiblitz.sh b/home.admin/00raspiblitz.sh index 1afa124a6..e7eeb7245 100755 --- a/home.admin/00raspiblitz.sh +++ b/home.admin/00raspiblitz.sh @@ -262,15 +262,17 @@ if [ ${setupStep} -eq 0 ]; then TITLE="⚡ Welcome to your RaspiBlitz ⚡" MENU="\nChoose how you want to setup your RaspiBlitz: \n " OPTIONS+=(BITCOIN "Setup BITCOIN and Lightning (DEFAULT)" \ - LITECOIN "Setup LITECOIN and Lightning (EXPERIMENTAL)" ) - HEIGHT=11 + LITECOIN "Setup LITECOIN and Lightning (EXPERIMENTAL)" \ + MIGRATION "Upload a Migration File from old RaspiBlitz" ) + HEIGHT=12 else # start setup BACKTITLE="RaspiBlitz - Setup" TITLE="⚡ Welcome to your RaspiBlitz ⚡" MENU="\nStart to setup your RaspiBlitz: \n " - OPTIONS+=(BITCOIN "Setup BITCOIN and Lightning") - HEIGHT=10 + OPTIONS+=(BITCOIN "Setup BITCOIN and Lightning" \ + MIGRATION "Upload a Migration File from old RaspiBlitz") + HEIGHT=11 fi fi @@ -414,6 +416,11 @@ case $CHOICE in sudo /home/admin/XXshutdown.sh reboot exit 0 ;; + MIGRATION) + sudo /home/admin/config.scripts/blitz.migration.sh "import-gui" + echo "PRESS ENTER to continue/reboot" + sudo shutdown -r now + exit 0 X) lncli -h echo "OK you now on the command line." diff --git a/home.admin/config.scripts/blitz.migration.sh b/home.admin/config.scripts/blitz.migration.sh index 1993f39e6..85e2df0e6 100644 --- a/home.admin/config.scripts/blitz.migration.sh +++ b/home.admin/config.scripts/blitz.migration.sh @@ -127,6 +127,11 @@ if [ "$1" = "export-gui" ]; then # cleaning old migration files from blitz sudo rm ${defaultZipPath}/*.tar.gz + # stopping lnd / bitcoin + echo "--> stopping services ..." + sudo systemctl stop lnd + sudo systemctl stop bitcoind + # create new migration file clear echo "--> creating blitz migration file ... (please wait)" @@ -147,11 +152,11 @@ if [ "$1" = "export-gui" ]; then echo "" echo "Use password A to authenticate file transfere." echo - echo "BEWARE: Your Lightning node is now stopped. So its safe to backup the data and restore it" - echo "later on - for example on a fresh RaspiBlitz. But once this Lightning node gets started" - echo "again by 'sudo systemctl start lnd' or a reboot its not adviced to restore the backup file" - echo "anymore because it cointains outdated channel data and can lead to loss of channel funds." - + echo "Your Lightning node is now stopped. After download press ENTER to shutdown your raspiblitz." + echo "To complete the data migration follow then instructions on the github FAQ." + echo + read key + /home/admin/XXshutdown.sh exit 0 fi