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,8 +260,9 @@ 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)
|
||||||
|
if [ ${#seedwords6x4} -gt 0 ];then
|
||||||
|
# show the words one last time
|
||||||
ack=0
|
ack=0
|
||||||
while [ ${ack} -eq 0 ]
|
while [ ${ack} -eq 0 ]
|
||||||
do
|
do
|
||||||
|
@ -271,12 +272,13 @@ elif [ "$1" = "encrypt" ]; then
|
||||||
ack=1
|
ack=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
# delete seedwords.info
|
deletedWhen="deleted when the hsm_secret was encrypted"
|
||||||
sudo -u bitcoin shred /home/bitcoin/.lightning/${CLNETWORK}/seedwords.info
|
|
||||||
deletedWhen=" "
|
|
||||||
else
|
else
|
||||||
deletedWhen="not available any more"
|
deletedWhen="not available any more"
|
||||||
fi
|
fi
|
||||||
|
# delete seedwords.info
|
||||||
|
sudo -u bitcoin shred /home/bitcoin/.lightning/${CLNETWORK}/seedwords.info
|
||||||
|
fi
|
||||||
echo "
|
echo "
|
||||||
# This file is placed by cln.hsmtool.sh .
|
# This file is placed by cln.hsmtool.sh .
|
||||||
# The seed words from which the hsm_secret in the same directory was generated
|
# The seed words from which the hsm_secret in the same directory was generated
|
||||||
|
|
Loading…
Add table
Reference in a new issue