From b46b8b1eaee69eae824bf5b86db2b90140f5a8a9 Mon Sep 17 00:00:00 2001 From: tim Date: Sat, 10 Mar 2018 00:13:49 +0200 Subject: [PATCH] Switch to using nslookup, which should come with nsupdate. --- update_ip.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update_ip.sh b/update_ip.sh index 1d40325..e58b495 100755 --- a/update_ip.sh +++ b/update_ip.sh @@ -7,7 +7,8 @@ host=desktop secret="" ip=$(wget -4 -q -O - http://treehouse.org.za/ip) -set_ip=$(dig +short ${host}.${zone}) +#set_ip=$(dig +short -t a ${host}.${zone}) +set_ip=$(nslookup -type=a ${host}.${zone} | awk '/^Address: / { print $2 }') if [ -z ${ip} ] || [ -z ${cache} ]; then exit;