@ -213,7 +213,17 @@ if [ ${walletExists} -eq 0 ]; then
ONLYSEED "Only Seed Word List (FALLBACK)")
CHOICE=$(dialog --backtitle "RaspiBlitz" --clear --title "RECOVER LND DATA & WALLET" --menu "Data you have to recover from?"11606"${OPTIONS[@]}" 2>&1 >/dev/tty)
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)"978 2>/home/admin/.seed.tmp
wordstring=$( cat /home/admin/.seed.tmp | sed 's/[^a-zA-Z0-9,]//g')
shred /home/admin/.seed.tmp
echo"processing ... ${wordstring}"
# check correct number of words
IFS=','read -r -a seedArray <<<"$wordstring"
if[${#seedArray[@]} -eq 24];then
echo"OK - 24 words"
else
whiptail --title " WARNING " --msgbox "
The word list has ${#seedArray[@]} words. But it must be 24.
Please check your list and try again.
Best is to write words in external editor
and then copy and paste them into dialog.
The Word list should look like this:
wordone,wordtweo,wordthree, ...
" 16 52
/home/admin/70initLND.sh
exit1
fi
# ask if seed was protected by password D
passwordD=""
dialog --title "SEED PASSWORD" --yes-button "No extra Password" --no-button "Yes" --yesno "
Are your seed words protected by an extra password?
During wallet creation LND offers to set an extra password
to protect the seed words. Most users did not set this.
" 11 65
if[$? -eq 1];then
sudo shred /home/admin/.pass.tmp 2>/dev/null
sudo ./config.scripts/blitz.setpassword.sh x "Enter extra Password D" /home/admin/.pass.tmp
# on success the python script should return the seed words again
if[${#seedwords} -gt 1];then
dialog --title " SUCCESS " --msgbox "
Looks good :) LND was able to recover the wallet.
" 7 53
else
if[${#err} -eq 0];then
echo
echo"FAIL!! Unkown Error - check output above for any hints and report to development."
echo"PRESS ENTER to try again."
read key
/home/admin/70initLND.sh
exit1
else
whiptail --title " FAIL " --msgbox "
Something went wrong - see info below:
${err}
${errMore}
" 13 72
/home/admin/70initLND.sh
exit1
fi
fi
elif["${CHOICE}"=="SEED+SCB"];then
##### DEACTIVATED UNTIL config.scripts/lnd.initwallet.py WORKS
# # let user enter password c
# sudo shred /home/admin/.pass.tmp 2>/dev/null
# sudo ./config.scripts/blitz.setpassword.sh x "Set your Password C for the LND Wallet Unlock" /home/admin/.pass.tmp
# passwordC=`sudo cat /home/admin/.pass.tmp`
# sudo shred /home/admin/.pass.tmp 2>/dev/null
#
# # get seed word list
# if [ "${CHOICE}" == "SEED+SCB" ] || [ "${CHOICE}" == "ONLYSEED" ]; then
#
# # dialog to enter
# 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 2>/home/admin/.seed.tmp
# wordstring=$( cat /home/admin/.seed.tmp | sed 's/[^a-zA-Z0-9,]//g' )
# shred /home/admin/.seed.tmp
# echo "processing ... ${wordstring}"
#
# # check correct number of words
# IFS=',' read -r -a seedArray <<< "$wordstring"
# if [ ${#seedArray[@]} -eq 24 ]; then
# echo "OK - 24 words"
# else
# whiptail --title " WARNING " --msgbox "
#The word list has ${#seedArray[@]} words. But it must be 24.
#Please check your list and try again.
#
#Best is to write words in external editor
#and then copy and paste them into dialog.
#
#The Word list should look like this:
#wordone,wordtweo,wordthree, ...
#
#" 16 52
# /home/admin/70initLND.sh
# exit 1
# fi
#
# # ask if seed was protected by password D
# passwordD=""
# dialog --title "SEED PASSWORD" --yes-button "No extra Password" --no-button "Yes" --yesno "
#Are your seed words protected by an extra password?
#
#During wallet creation LND offers to set an extra password
#to protect the seed words. Most users did not set this.
# " 11 65
# if [ $? -eq 1 ]; then
# sudo shred /home/admin/.pass.tmp 2>/dev/null
# sudo ./config.scripts/blitz.setpassword.sh x "Enter extra Password D" /home/admin/.pass.tmp