try additional web service for current ip address(es)
authorgregor herrmann <gregoa@debian.org>
Tue, 9 Aug 2016 14:38:56 +0000 (16:38 +0200)
committergregor herrmann <gregoa@debian.org>
Tue, 9 Aug 2016 14:38:56 +0000 (16:38 +0200)
helps when the first is not reachable

bin/client/tdyndns_client

index 8fe810a..1c04e34 100755 (executable)
@@ -41,9 +41,8 @@ fi
 
 # data
 
-# alternative: -4 icanhazip.com, -6 icanhazip.com or ipv{4,6}.icanhazip.com
-NEWIPV4=$($WGET -O- http://ipv4.wtfismyip.com/text)
-NEWIPV6=$($WGET -O- http://ipv6.wtfismyip.com/text)
+NEWIPV4=$($WGET -O- http://ipv4.wtfismyip.com/text || $WGET -O- http://ipv4.icanhazip.com)
+NEWIPV6=$($WGET -O- http://ipv6.wtfismyip.com/text || $WGET -O- http://ipv6.icanhazip.com)
 
 if command -v dig >/dev/null ; then
        OLDIPV4=$(dig -t a    +short $FQDN @$NS)