mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-19 20:24:39 +02:00
harmonize seed input vars
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# TODO: use blitz.upload.sh for uploading the migration file
|
||||
# TODO: also the migration might need to be adapted to work with an already mounted HDD later
|
||||
|
||||
# command info
|
||||
|
@@ -178,8 +178,17 @@ fi
|
||||
|
||||
# INPUT LIGHTNING SEED dialog (if activated by dialogs above)
|
||||
if [ ${enterSEED} -eq 1 ]; then
|
||||
echo "TODO: INPUT LIGHTNING SEED"
|
||||
exit 1
|
||||
/home/admin/config.scripts/lnd.backup.sh seed-import-gui
|
||||
# load results from results file
|
||||
source <(/var/cache/raspiblitz/seed-import.results)
|
||||
# if user canceled the seed input
|
||||
if [ "${seedWords}" == "" ]; then
|
||||
echo "# you selected cancel - exited to terminal"
|
||||
echo "# use command 'restart' to reboot & start again"
|
||||
exit 1
|
||||
fi
|
||||
echo "seedWords='${seedWords}'" >> $SETUPFILE
|
||||
echo "seedPassword='${seedPassword}'" >> $SETUPFILE
|
||||
fi
|
||||
|
||||
# UPLOAD STATIC CHANNEL BACKUP FILE dialog (if activated by dialogs above)
|
||||
|
@@ -440,14 +440,14 @@ fi
|
||||
# SEED WORDS - GUI PARTS
|
||||
####################################
|
||||
|
||||
echo "# lnd.backup.sh seed-export-gui [seedwords6x4]"
|
||||
echo "# lnd.backup.sh seed-import-gui [resultfile]"
|
||||
|
||||
if [ ${mode} = "seed-export-gui" ]; then
|
||||
|
||||
# use text snippet for testing:
|
||||
#
|
||||
|
||||
# 2nd PARAMETER: lnd seed data
|
||||
seedwords=$2
|
||||
if [ "${seedwords}" == "" ]; then
|
||||
seedwords6x4=$2
|
||||
if [ "${seedwords6x4}" == "" ]; then
|
||||
echo "error='mising parameter'"
|
||||
exit 1
|
||||
fi
|
||||
@@ -468,6 +468,9 @@ fi
|
||||
# /var/cache/raspiblitz/seed-import.results
|
||||
if [ ${mode} = "seed-import-gui" ]; then
|
||||
|
||||
# fake seed 24 words for testing input:
|
||||
# eins zwei polizei drei vier great idea fünf sechs alte keks sieben auch gute nacht ja ja ja was ist los was ist das
|
||||
|
||||
# prepare seed result file
|
||||
sudo rm /var/cache/raspiblitz/seed-import.results 2>/dev/null
|
||||
sudo touch /var/cache/raspiblitz/seed-import.results
|
||||
@@ -538,8 +541,8 @@ to protect the seed words. Most users did not set this.
|
||||
# writing result file data
|
||||
clear
|
||||
echo "# result of in mem cache: /var/cache/raspiblitz/seed-import.results"
|
||||
echo "seedwords='${wordstring}'" >> /var/cache/raspiblitz/seed-import.results
|
||||
echo "password='${passwordD}'" >> /var/cache/raspiblitz/seed-import.results
|
||||
echo "seedWords='${wordstring}'" >> /var/cache/raspiblitz/seed-import.results
|
||||
echo "seedPassword='${passwordD}'" >> /var/cache/raspiblitz/seed-import.results
|
||||
exit 0
|
||||
|
||||
fi
|
||||
|
Reference in New Issue
Block a user