bash/ydns-simple: add trailing . to dig queries

`2015-06-01 22:12:20+0300 < jima> without the trailing dot you run the
risk of it appending the search domain from dhcp, which, in some cases,
can have "interesting" results`
This commit is contained in:
Aminda Suomalainen 2015-06-01 22:15:00 +03:00
parent 0fce9cca1d
commit 261fba4f6e

View File

@ -18,7 +18,7 @@ PASSWORD=""
HOSTNAME=""
# Get IPv4 address
WAN_IP4=$(dig +short myip.opendns.com @208.67.220.220)
WAN_IP4=$(dig +short myip.opendns.com. @208.67.220.220)
if [ -f $HOME/.wan_ip4-ydns.txt ]; then
OLD_WAN_IP4=$(cat $HOME/.wan_ip4-ydns.txt)
else
@ -27,7 +27,7 @@ else
fi
# Get IPv6 address
WAN_IP6=$(dig +short myip.opendns.com AAAA @2620:0:ccd::2)
WAN_IP6=$(dig +short myip.opendns.com. AAAA @2620:0:ccd::2)
if [ -f $HOME/.wan_ip6-ydns.txt ]; then
OLD_WAN_IP6=$(cat $HOME/.wan_ip6-ydns.txt)
else