Update nodemgmt-scripts.sh

This commit is contained in:
2022-07-30 15:53:14 -05:00
parent b3c00661f3
commit f8d943afde

View File

@@ -1798,7 +1798,7 @@ UPDATE_DYNDNS(){
OLDIP=`dig +short sc1.scity.us @ns1.scity.us`
NEWIP=`dig +short myip.opendns.com @resolver1.opendns.com`
if [ "${OLDIP}" != "${NEWIP}" ]; then
if [ "${OLDIP}" != "${NEWIP}" ] && [ "${NEWIP}" != ";; connection timed out; no servers could be reached" ]; then
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=sc1.scity.us&myip=${NEWIP}" > /dev/null 2>&1
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=sc2.scity.us&myip=${NEWIP}" > /dev/null 2>&1
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=scity.us&myip=${NEWIP}" > /dev/null 2>&1