adding data migration import option

This commit is contained in:
rootzoll
2020-02-14 15:00:43 +01:00
parent 4098e71a43
commit 7fad0db367
2 changed files with 21 additions and 9 deletions

View File

@@ -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."

View File

@@ -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