From 68dbfeb3d0682f468c44b48e43e634b8458076ab Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 25 Jul 2017 10:02:14 +0100 Subject: [PATCH] fixed the rndc check to insure it runs --- getip.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/getip.sh b/getip.sh index f358020..dca7afc 100755 --- a/getip.sh +++ b/getip.sh @@ -239,10 +239,13 @@ function setDNS () { echoTweak "1" 8 '\040' >> "$FILENAME" echo "IN A ${row[2]}" >> "$FILENAME" # Only reload the rndc if found - command -v rndc >/dev/null 2>&1 || { + if [ -f "/etc/rndc.conf" ] + then + cd /var/named rndc reload "$RELOADNAME" IN external rndc reload "$RELOADNAME" IN internal - } + cd ~ + fi echo "Done" fi fi