mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-03-27 02:01:53 +01:00
#2925 encrypt and lock cl wallet before backup
This commit is contained in:
parent
f845592b10
commit
4c4aef9fcc
@ -106,6 +106,13 @@ case $CHOICE in
|
||||
read key
|
||||
;;
|
||||
MIGRATION)
|
||||
if [ "${cl}" == "on" ] || [ "${cl}" == "1" ] && [ "${clEncryptedHSM}" != "on" ] ; then
|
||||
dialog \
|
||||
--title "Encrypt the C-lightning wallet" \
|
||||
--infobox "\nWill proceed to encrypt and lock the C-lightning wallet to prevent it from starting automatically after the backup" 7 55
|
||||
sudo /home/admin/config.scripts/cl.hsmtool.sh encrypt mainnet
|
||||
/home/admin/config.scripts/cl.hsmtool.sh lock mainnet
|
||||
fi
|
||||
sudo /home/admin/config.scripts/blitz.migration.sh "export-gui"
|
||||
echo "Press ENTER to return to main menu."
|
||||
read key
|
||||
|
@ -90,8 +90,14 @@ case $CHOICE in
|
||||
;;
|
||||
|
||||
BACKUP)
|
||||
if [ "${cl}" == "on" ] || [ "${cl}" == "1" ] && [ "${clEncryptedHSM}" != "on" ] ; then
|
||||
dialog \
|
||||
--title "Encrypt the C-lightning wallet" \
|
||||
--infobox "\nWill proceed to encrypt and lock the C-lightning wallet to prevent it from starting automatically after the backup" 7 55
|
||||
sudo /home/admin/config.scripts/cl.hsmtool.sh encrypt mainnet
|
||||
/home/admin/config.scripts/cl.hsmtool.sh lock mainnet
|
||||
fi
|
||||
## from dialogLightningWallet.sh
|
||||
# run upload dialog and get result
|
||||
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
|
||||
clear
|
||||
/home/admin/config.scripts/cl.backup.sh cl-export-gui production $_temp
|
||||
|
@ -333,7 +333,7 @@ if [ ${mode} = "cl-import-gui" ]; then
|
||||
|
||||
done
|
||||
|
||||
# in setup scenario the final import is happening during provison
|
||||
# in setup scenario the final import is happening during provision
|
||||
if [ "${scenario}" == "setup" ]; then
|
||||
# just add clrescue filename to give file
|
||||
echo "# result in: ${RESULTFILE} (remember to make clean delete once processed)"
|
||||
@ -381,7 +381,7 @@ if [ ${mode} = "cl-import-gui" ]; then
|
||||
else
|
||||
cat $output
|
||||
echo "# Starting cl.hsmtool.sh unlock"
|
||||
/home/admin/config.scripts/cl.hsmtool.sh unlock # there are mutiple wallets possible, need to check for non-default ones too
|
||||
/home/admin/config.scripts/cl.hsmtool.sh unlock $CHAIN
|
||||
fi
|
||||
|
||||
# set the lightningd service file on each active network
|
||||
|
Loading…
x
Reference in New Issue
Block a user