mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-06 18:12:14 +02:00
#2925 encrypt and lock cl wallet before backup
This commit is contained in:
@@ -106,6 +106,13 @@ case $CHOICE in
|
|||||||
read key
|
read key
|
||||||
;;
|
;;
|
||||||
MIGRATION)
|
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"
|
sudo /home/admin/config.scripts/blitz.migration.sh "export-gui"
|
||||||
echo "Press ENTER to return to main menu."
|
echo "Press ENTER to return to main menu."
|
||||||
read key
|
read key
|
||||||
|
@@ -90,8 +90,14 @@ case $CHOICE in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
BACKUP)
|
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
|
## from dialogLightningWallet.sh
|
||||||
# run upload dialog and get result
|
|
||||||
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
|
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
|
||||||
clear
|
clear
|
||||||
/home/admin/config.scripts/cl.backup.sh cl-export-gui production $_temp
|
/home/admin/config.scripts/cl.backup.sh cl-export-gui production $_temp
|
||||||
|
@@ -333,7 +333,7 @@ if [ ${mode} = "cl-import-gui" ]; then
|
|||||||
|
|
||||||
done
|
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
|
if [ "${scenario}" == "setup" ]; then
|
||||||
# just add clrescue filename to give file
|
# just add clrescue filename to give file
|
||||||
echo "# result in: ${RESULTFILE} (remember to make clean delete once processed)"
|
echo "# result in: ${RESULTFILE} (remember to make clean delete once processed)"
|
||||||
@@ -381,7 +381,7 @@ if [ ${mode} = "cl-import-gui" ]; then
|
|||||||
else
|
else
|
||||||
cat $output
|
cat $output
|
||||||
echo "# Starting cl.hsmtool.sh unlock"
|
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
|
fi
|
||||||
|
|
||||||
# set the lightningd service file on each active network
|
# set the lightningd service file on each active network
|
||||||
|
Reference in New Issue
Block a user