use variable and set to icanhazip.com because ifconfig.co doesn't seem to be great

master
rasul 5 years ago
parent a7f36e7568
commit b262281294

@ -8,6 +8,7 @@ die() {
url="https://dyn.dns.he.net/nic/update" url="https://dyn.dns.he.net/nic/update"
config="/usr/local/etc/he-ddnsrc" config="/usr/local/etc/he-ddnsrc"
ip_host="icanhazip.com"
help_text="Usage: $0 [OPTIONS] help_text="Usage: $0 [OPTIONS]
Update Hurricane Electric Dynamic DNS for domains in the configuration file Update Hurricane Electric Dynamic DNS for domains in the configuration file
@ -49,7 +50,7 @@ done
# shellcheck source=he-ddnsrc # shellcheck source=he-ddnsrc
. "$config" || die $LINENO . "$config" || die $LINENO
ipv4="$(curl -sSL4 https://ifconfig.co/ip)" || die $LINENO ipv4="$(curl -sSL4 "$ip_host")" || die $LINENO
for domain in "${!DOMAINS4[@]}"; do for domain in "${!DOMAINS4[@]}"; do
printf "%s :: " "$domain" printf "%s :: " "$domain"
key=${DOMAINS4[$domain]} key=${DOMAINS4[$domain]}
@ -57,7 +58,7 @@ for domain in "${!DOMAINS4[@]}"; do
echo echo
done done
ipv6="$(curl -sSL6 https://ifconfig.co/ip)" || die $LINENO ipv6="$(curl -sSL6 "$ip_host")" || die $LINENO
for domain in "${!DOMAINS6[@]}"; do for domain in "${!DOMAINS6[@]}"; do
printf "%s :: " "$domain" printf "%s :: " "$domain"
key=${DOMAINS6[$domain]} key=${DOMAINS6[$domain]}

Loading…
Cancel
Save