From 2744826d588f03a239bbad572afd3830ae623d78 Mon Sep 17 00:00:00 2001 From: /geco Date: Mon, 24 Dec 2018 00:46:48 +0100 Subject: [PATCH] put new values to the right place --- home.admin/config.scripts/lnd.autounlock.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home.admin/config.scripts/lnd.autounlock.sh b/home.admin/config.scripts/lnd.autounlock.sh index 5f3465123..f6efe77f2 100755 --- a/home.admin/config.scripts/lnd.autounlock.sh +++ b/home.admin/config.scripts/lnd.autounlock.sh @@ -62,11 +62,11 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # make sure config values exits exists=$(sudo cat /mnt/hdd/lnd/lnd.conf | grep -c 'restlisten=') if [ ${exists} -eq 0 ]; then - sudo sh -c "echo \"restlisten=\" >> /mnt/hdd/lnd/lnd.conf" + sudo sed -n -i 'p;4a restlisten=' /mnt/hdd/lnd/lnd.conf fi exists=$(sudo cat /mnt/hdd/lnd/lnd.conf | grep -c 'tlsextraip') if [ ${exists} -eq 0 ]; then - sudo sh -c "echo \"tlsextraip=\" >> /mnt/hdd/lnd/lnd.conf" + sudo sed -n -i 'p;5a tlsextraip=' /mnt/hdd/lnd/lnd.conf fi # set needed config values