From b2622812942c46c4383934d2f050f06cb9b3f602 Mon Sep 17 00:00:00 2001 From: rasul Date: Sun, 28 Jun 2020 12:37:35 -0500 Subject: [PATCH] use variable and set to icanhazip.com because ifconfig.co doesn't seem to be great --- he-ddns | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/he-ddns b/he-ddns index da40549..bb1b2b4 100755 --- a/he-ddns +++ b/he-ddns @@ -8,6 +8,7 @@ die() { url="https://dyn.dns.he.net/nic/update" config="/usr/local/etc/he-ddnsrc" +ip_host="icanhazip.com" help_text="Usage: $0 [OPTIONS] Update Hurricane Electric Dynamic DNS for domains in the configuration file @@ -49,7 +50,7 @@ done # shellcheck source=he-ddnsrc . "$config" || die $LINENO -ipv4="$(curl -sSL4 https://ifconfig.co/ip)" || die $LINENO +ipv4="$(curl -sSL4 "$ip_host")" || die $LINENO for domain in "${!DOMAINS4[@]}"; do printf "%s :: " "$domain" key=${DOMAINS4[$domain]} @@ -57,7 +58,7 @@ for domain in "${!DOMAINS4[@]}"; do echo done -ipv6="$(curl -sSL6 https://ifconfig.co/ip)" || die $LINENO +ipv6="$(curl -sSL6 "$ip_host")" || die $LINENO for domain in "${!DOMAINS6[@]}"; do printf "%s :: " "$domain" key=${DOMAINS6[$domain]}