#711 ask for new node name of LND reset

This commit is contained in:
Christian Rotzoll 2019-08-07 12:56:28 +02:00
parent 12d6d2f88c
commit be2dba81df

View File

@ -84,9 +84,27 @@ case $CHOICE in
;;
RESET-LND)
askBackupCopy
# ask for a new name so that network analysis has harder time to connect new node id with old
result=""
while [ ${#result} -eq 0 ]
do
l1="Please enter the new name of your LND node:\n"
l2="different name is better for a fresh identity\n"
l3="one word, keep characters basic & not too long"
dialog --backtitle "RaspiBlitz - Setup (${network}/${chain})" --inputbox "$l1$l2$l3" 13 52 2>$_temp
result=$( cat $_temp | tr -dc '[:alnum:]-.' | tr -d ' ' )
shred $_temp
echo "processing ..."
sleep 3
done
# prepare new name
sed -i "s/^alias=.*/alias=${result}/g" /home/admin/assets/lnd.${network}.conf
sed -i "s/^hostname=.*/hostname=${result}/g" /mnt/hdd/raspiblitz.conf
sudo systemctl stop lnd
sudo rm -r /mnt/hdd/lnd
/home/admin/70initLND.sh
exit 1;
;;
RESET-HDD)