From e73372d6aef563de8ada268a357ad567c0edc7d2 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Mon, 18 Feb 2019 17:35:34 +0100 Subject: [PATCH] fixing dynUpdateUrl bug --- home.admin/config.scripts/internet.dyndomain.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/home.admin/config.scripts/internet.dyndomain.sh b/home.admin/config.scripts/internet.dyndomain.sh index fd9ee5b..0010d87 100755 --- a/home.admin/config.scripts/internet.dyndomain.sh +++ b/home.admin/config.scripts/internet.dyndomain.sh @@ -91,7 +91,12 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # setting value in raspi blitz config sudo sed -i "s/^dynDomain=.*/dynDomain='${dynDomain}'/g" /mnt/hdd/raspiblitz.conf - sudo sed -i "s/^dynUpdateUrl=.*/dynUpdateUrl='${dynUpdateUrl}'/g" /mnt/hdd/raspiblitz.conf + + # setting dynUpdateUrl is a bit cpmplicated because value can contain chars that break sed replacement + # so first remove dynUpdateUrl from config and then add fresh as new line at the end + grep -v "dynUpdateUrl" /mnt/hdd/raspiblitz.conf > /mnt/hdd/raspiblitz.conf + echo "dynUpdateUrl='${dynUpdateUrl}'" >> ${configFile} + #sudo sed -i "s/^dynUpdateUrl=.*/dynUpdateUrl='${dynUpdateUrl}'/g" /mnt/hdd/raspiblitz.conf echo "changing lnd.conf"