mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-25 07:07:46 +01:00
hsmtool: show only existing words
This commit is contained in:
parent
a673ee64a4
commit
aec26f9b52
1 changed files with 15 additions and 13 deletions
|
@ -260,22 +260,24 @@ elif [ "$1" = "lock" ]; then
|
||||||
|
|
||||||
elif [ "$1" = "encrypt" ]; then
|
elif [ "$1" = "encrypt" ]; then
|
||||||
if [ -f /home/bitcoin/.lightning/${CLNETWORK}/seedwords.info ];then
|
if [ -f /home/bitcoin/.lightning/${CLNETWORK}/seedwords.info ];then
|
||||||
# show the words one last time
|
|
||||||
source <(sudo -u bitcoin cat /home/bitcoin/.lightning/${CLNETWORK}/seedwords.info)
|
source <(sudo -u bitcoin cat /home/bitcoin/.lightning/${CLNETWORK}/seedwords.info)
|
||||||
ack=0
|
if [ ${#seedwords6x4} -gt 0 ];then
|
||||||
while [ ${ack} -eq 0 ]
|
# show the words one last time
|
||||||
do
|
ack=0
|
||||||
whiptail --title "IMPORTANT SEED WORDS - PLEASE WRITE DOWN" --msgbox "The backup of seedwords will be deleted, make sure you wrote them down. Store these numbered 24 words in a safe location:\n\n${seedwords6x4}" 13 76
|
while [ ${ack} -eq 0 ]
|
||||||
whiptail --title "Please Confirm" --yes-button "Show Again" --no-button "CONTINUE" --yesno " Are you sure that you wrote down the word list?" 8 55
|
do
|
||||||
if [ $? -eq 1 ]; then
|
whiptail --title "IMPORTANT SEED WORDS - PLEASE WRITE DOWN" --msgbox "The backup of seedwords will be deleted, make sure you wrote them down. Store these numbered 24 words in a safe location:\n\n${seedwords6x4}" 13 76
|
||||||
ack=1
|
whiptail --title "Please Confirm" --yes-button "Show Again" --no-button "CONTINUE" --yesno " Are you sure that you wrote down the word list?" 8 55
|
||||||
fi
|
if [ $? -eq 1 ]; then
|
||||||
done
|
ack=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
deletedWhen="deleted when the hsm_secret was encrypted"
|
||||||
|
else
|
||||||
|
deletedWhen="not available any more"
|
||||||
|
fi
|
||||||
# delete seedwords.info
|
# delete seedwords.info
|
||||||
sudo -u bitcoin shred /home/bitcoin/.lightning/${CLNETWORK}/seedwords.info
|
sudo -u bitcoin shred /home/bitcoin/.lightning/${CLNETWORK}/seedwords.info
|
||||||
deletedWhen=" "
|
|
||||||
else
|
|
||||||
deletedWhen="not available any more"
|
|
||||||
fi
|
fi
|
||||||
echo "
|
echo "
|
||||||
# This file is placed by cln.hsmtool.sh .
|
# This file is placed by cln.hsmtool.sh .
|
||||||
|
|
Loading…
Add table
Reference in a new issue