Switch to using nslookup, which should come with nsupdate.

This commit is contained in:
Timothy Allen 2018-03-10 00:13:49 +02:00
parent 4d5ad57d52
commit b46b8b1eae

View File

@ -7,7 +7,8 @@ host=desktop
secret="" secret=""
ip=$(wget -4 -q -O - http://treehouse.org.za/ip) 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 if [ -z ${ip} ] || [ -z ${cache} ]; then
exit; exit;