Update nodemgmt-scripts.sh
This commit is contained in:
@@ -1737,19 +1737,22 @@ UPDATE_DYNDNS(){
|
||||
echo -en "${idsCL[LightCyan]}Updating Primary DNS A records with any WAN IP changes... ${idsCL[Default]}"
|
||||
fi
|
||||
|
||||
OLDIP=`dig +short sc2.scity.us @ns1.scity.us`
|
||||
NEWIP=`dig +short myip.opendns.com @resolver1.opendns.com`
|
||||
|
||||
/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=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.xyz&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=schroedercity.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=cloud.schroedercity.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=dasrei.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=snsinvest.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=misfitsmc.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||
if [ "${OLDIP}" != "${NEWIP}" ]; 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=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.xyz&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=schroedercity.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=cloud.schroedercity.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=dasrei.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=snsinvest.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=misfitsmc.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||
|
||||
echo "DYNDNS Updated" | mail -s "`hostname` (`hostname -I`) sent update" 9208839613@mms.att.net
|
||||
echo "DYNDNS Updated" | mail -s "`hostname` (`hostname -I`) sent update" 9208839613@mms.att.net
|
||||
fi
|
||||
|
||||
if [ "${1}" != 'q' ]; then
|
||||
echo -e "${idsCL[Green]}Done${idsCL[Default]}"
|
||||
|
||||
Reference in New Issue
Block a user