diff --git a/ddns4.sh b/ddns4.sh index 940fbf7..ab2e6fb 100755 --- a/ddns4.sh +++ b/ddns4.sh @@ -44,6 +44,9 @@ echo -e "${INFO} started $(date)" echo -e "${INFO} DNS Record will be $SUBDOMAIN_IPV4.$DNSZONE_IPV4" echo -e "${PENDING} get IP address" IPv4="$(curl -s4 https://ip.hetzner.com)" +if [[ -z $IPv4 ]]; then + IPv4="$(curl -s4 https://icanhazip.com)" +fi if [[ -z $IPv4 ]]; then echo -e "${REPLACE}${FAIL} IPv4 not found" exit 1 diff --git a/ddns6.sh b/ddns6.sh index ca1fa80..5ade751 100755 --- a/ddns6.sh +++ b/ddns6.sh @@ -44,6 +44,9 @@ echo -e "${INFO} started $(date)" echo -e "${INFO} DNS Record will be $SUBDOMAIN_IPV6.$DNSZONE_IPV6" echo -e "${PENDING} get IP address" IPv6="$(curl -s6 https://ip.hetzner.com)" +if [[ -z $IPv6 ]]; then + IPv6="$(curl -s6 https://icanhazip.com)" +fi if [[ -z $IPv6 ]]; then echo -e "${REPLACE}${FAIL} IPv6 not found" exit 1