mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 18:22:01 +01:00
test
This commit is contained in:
parent
9bf2490256
commit
4c5263bccb
@ -201,35 +201,36 @@ if [ ${walletExists} -eq 0 ]; then
|
||||
else
|
||||
|
||||
OPTIONS=(LNDRESCUE "LND tar.gz-Backupfile (BEST)" \
|
||||
SEED+SCB "Seed & channel.backup file (OK)" \
|
||||
SEED_SCB "Seed & channel.backup file (OK)" \
|
||||
ONLYSEED "Only Seed Word List (FALLBACK)")
|
||||
CHOICE=$(dialog --backtitle "RaspiBlitz" --clear --title "RECOVER LND DATA & WALLET" --menu "Data you have to recover from?" 11 60 6 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||
echo "choice($CHOICE)"
|
||||
|
||||
if [ "${CHOICE}" == "ONLYSEED" ] || [ "${CHOICE}" == "SEED+SCB" ]; then
|
||||
if [ "${CHOICE}" == "SEED_SCB" ]; then
|
||||
|
||||
echo "ENTER SEED"
|
||||
# dialog to enter
|
||||
#$_temp="/home/admin/.seed.tmp"
|
||||
wordstring=$(whiptail --backtitle "RaspiBlitz - LND Recover" --inputbox "Please enter/paste the SEED WORD LIST:\n(just the words, seperated by commas, in correct order as numbered)" 9 78)
|
||||
dialog --backtitle "RaspiBlitz - LND Recover" --inputbox "Please enter/paste the SEED WORD LIST:\n(just the words, seperated by commas, in correct order as numbered)" 9 78
|
||||
#wordstring=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' )
|
||||
#shred $_temp
|
||||
echo "processing ..."
|
||||
#echo "processing ..."
|
||||
|
||||
# remove spaces
|
||||
wordstring=$(echo "${wordstring}" | sed 's/[^a-zA-Z0-9 ]//g')
|
||||
#wordstring=$(echo "${wordstring}" | sed 's/[^a-zA-Z0-9 ]//g')
|
||||
|
||||
# string to array
|
||||
IFS=',' read -r -a seedArray <<< "$wordstring"
|
||||
#IFS=',' read -r -a seedArray <<< "$wordstring"
|
||||
|
||||
# check array
|
||||
if [ ${#seedArray[@]} -eq 24 ]; then
|
||||
echo "OK - 24 words"
|
||||
exit 1
|
||||
else
|
||||
echo "wrong number of words"
|
||||
wordstring=""
|
||||
exit 1
|
||||
fi
|
||||
#if [ ${#seedArray[@]} -eq 24 ]; then
|
||||
# echo "OK - 24 words"
|
||||
# exit 1
|
||||
#else
|
||||
# echo "wrong number of words"
|
||||
# wordstring=""
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
fi
|
||||
|
||||
@ -237,7 +238,7 @@ if [ ${walletExists} -eq 0 ]; then
|
||||
echo "TODO: ONLYSEED"
|
||||
exit 1
|
||||
|
||||
elif [ "${CHOICE}" == "SEED+SCB" ]; then
|
||||
elif [ "${CHOICE}" == "SEED_SCB" ]; then
|
||||
echo "TODO: SEED+SCB"
|
||||
exit 1
|
||||
|
||||
@ -268,7 +269,6 @@ if [ ${walletExists} -eq 0 ]; then
|
||||
#sudo -u bitcoin /usr/local/bin/lncli --chain=${network} create
|
||||
#/home/admin/70initLND.sh
|
||||
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user