Fix RESET-LND (#2690)

* initialize LND wallet after reset
* diplay seed for mainnet after reset and init
* display and delete the seed for mainnet
* lnd.install: remove seedwordFile after shred

The seed will be safely deleted after having been displayed, the same as during the initial setup.
The seedwordFile is created and kept for testnet and signet if active.
This commit is contained in:
openoms 2021-11-02 12:19:33 +00:00 committed by rootzoll
parent 2c26fe40f4
commit 608a5854f7
2 changed files with 11 additions and 2 deletions

View File

@ -124,8 +124,16 @@ case $CHOICE in
echo "stopping lnd ..."
sudo systemctl stop lnd
sudo rm -r /mnt/hdd/lnd
/home/admin/70initLND.sh
# create wallet
/home/admin/config.scripts/lnd.install.sh on mainnet initwallet
# display and delete the seed for mainnet
sudo /home/admin/config.scripts/lnd.install.sh display-seed mainnet delete
if [ "${tlnd}" == "on" ];then
/home/admin/config.scripts/lnd.install.sh on testnet initwallet
fi
if [ "${slnd}" == "on" ];then
/home/admin/config.scripts/lnd.install.sh on signet initwallet
fi
# go back to main menu (and show)
/home/admin/00raspiblitz.sh
exit 0;

View File

@ -267,6 +267,7 @@ if [ "$1" = "display-seed" ]; then
if [ "${deleteSeedInfoAfterDisplay}" == "1" ]; then
echo "# deleting seed info"
sudo shred ${seedwordFile}
sudo rm ${seedwordFile}
fi
else
walletFile="/mnt/hdd/lnd/data/chain/${network}/${CHAIN}/wallet.db"