mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-20 13:02:21 +02:00
harmonize seed input vars
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# TODO: also the migration might need to be adapted to work with an already mounted HDD later
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
|
@@ -178,8 +178,17 @@ fi
|
|||||||
|
|
||||||
# INPUT LIGHTNING SEED dialog (if activated by dialogs above)
|
# INPUT LIGHTNING SEED dialog (if activated by dialogs above)
|
||||||
if [ ${enterSEED} -eq 1 ]; then
|
if [ ${enterSEED} -eq 1 ]; then
|
||||||
echo "TODO: INPUT LIGHTNING SEED"
|
/home/admin/config.scripts/lnd.backup.sh seed-import-gui
|
||||||
exit 1
|
# 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
|
fi
|
||||||
|
|
||||||
# UPLOAD STATIC CHANNEL BACKUP FILE dialog (if activated by dialogs above)
|
# UPLOAD STATIC CHANNEL BACKUP FILE dialog (if activated by dialogs above)
|
||||||
|
@@ -440,14 +440,14 @@ fi
|
|||||||
# SEED WORDS - GUI PARTS
|
# 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
|
if [ ${mode} = "seed-export-gui" ]; then
|
||||||
|
|
||||||
|
# use text snippet for testing:
|
||||||
|
#
|
||||||
|
|
||||||
# 2nd PARAMETER: lnd seed data
|
# 2nd PARAMETER: lnd seed data
|
||||||
seedwords=$2
|
seedwords6x4=$2
|
||||||
if [ "${seedwords}" == "" ]; then
|
if [ "${seedwords6x4}" == "" ]; then
|
||||||
echo "error='mising parameter'"
|
echo "error='mising parameter'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -468,6 +468,9 @@ fi
|
|||||||
# /var/cache/raspiblitz/seed-import.results
|
# /var/cache/raspiblitz/seed-import.results
|
||||||
if [ ${mode} = "seed-import-gui" ]; then
|
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
|
# prepare seed result file
|
||||||
sudo rm /var/cache/raspiblitz/seed-import.results 2>/dev/null
|
sudo rm /var/cache/raspiblitz/seed-import.results 2>/dev/null
|
||||||
sudo touch /var/cache/raspiblitz/seed-import.results
|
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
|
# writing result file data
|
||||||
clear
|
clear
|
||||||
echo "# result of in mem cache: /var/cache/raspiblitz/seed-import.results"
|
echo "# result of in mem cache: /var/cache/raspiblitz/seed-import.results"
|
||||||
echo "seedwords='${wordstring}'" >> /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 "seedPassword='${passwordD}'" >> /var/cache/raspiblitz/seed-import.results
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user