diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 156ab643..bc7874da 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -499,14 +499,11 @@ UPDATE_DYNDNS(){ echo -en "${idsCL[White]}Current WAN IP : "; NEWIP="$(dig +short myip.opendns.com @resolver1.opendns.com)" >/dev/null 2>&1 if [ "${NEWIP}" == "" ]; then - NEWIP="$(host myip.opendns.com resolver1.opendns.com)" >/dev/null 2>&1 + NEWIP="$(curl https://ipinfo.io/ip)" >/dev/null 2>&1 if [ "${NEWIP}" == "" ]; then - NEWIP="$(curl https://ipinfo.io/ip)" >/dev/null 2>&1 - if [ "${NEWIP}" == "" ]; then - NEWIP="$(wget -qO- https://ipecho.net/plain ; echo)" >/dev/null 2>&1 - else - NEWIP="WAN IP could not be found" - fi + NEWIP="$(wget -qO- https://ipecho.net/plain ; echo)" >/dev/null 2>&1 + else + NEWIP="WAN IP could not be found" fi fi # NEWIP=`dig +short myip.opendns.com @resolver1.opendns.com +time=2`; @@ -525,9 +522,9 @@ UPDATE_DYNDNS(){ fi if [ "${NM_PDNS_USER}" != "" ] && [ "${NM_PDNS_PASS}" != "" ]; then if [ "$(curl -m 3 -sL "https://${NM_PDNS_USER}df:${NM_PDNS_PASS}@${PDNS_SERVER}/domain/${domain}" | grep "HTTP 403 Error")" == "" ]; then - for host in ${DYNDNS_HOSTS[@]}; do - /usr/bin/curl -s "https://${NM_PDNS_USER}:${NM_PDNS_PASS}@${PDNS_SERVER}/nic/update?hostname=${host}&myip=${NEWIP}" > /dev/null 2>&1 - done + # for host in ${DYNDNS_HOSTS[@]}; do + # /usr/bin/curl -s "https://${NM_PDNS_USER}:${NM_PDNS_PASS}@${PDNS_SERVER}/nic/update?hostname=${host}&myip=${NEWIP}" > /dev/null 2>&1 + # done if [ "${NM_PDNS_USER}" == "systems" ]; then [ "${LOCATION,,}" == "mainsite" ] && /usr/bin/curl -s "https://${NM_PDNS_USER}:${NM_PDNS_PASS}@${NM_PDNS_LANDNS}/nic/update?hostname=sc1.scity.us&myip=${NEWIP}" > /dev/null 2>&1 [ "${LOCATION,,}" == "offsite" ] && /usr/bin/curl -s "https://${NM_PDNS_USER}:${NM_PDNS_PASS}@${NM_PDNS_LANDNS}/nic/update?hostname=wan.offsite.scity.us&myip=${NEWIP}" > /dev/null 2>&1