From be2dba81df938579e5d6bd12a8c118eb5775a11a Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Wed, 7 Aug 2019 12:56:28 +0200 Subject: [PATCH] #711 ask for new node name of LND reset --- home.admin/98repairMenu.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/home.admin/98repairMenu.sh b/home.admin/98repairMenu.sh index f1e632b1..90eeb3e2 100755 --- a/home.admin/98repairMenu.sh +++ b/home.admin/98repairMenu.sh @@ -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)