This commit is contained in:
2023-07-15 12:26:16 -05:00
parent 361166adc7
commit 3ab6850a07
2 changed files with 9 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
VERS='4.9.7-07062023'
VERS='4.9.8-07062023'
noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns '
CERT_DAEMON='/snap/bin/certbot'

View File

@@ -532,7 +532,14 @@ UPDATE_DYNDNS(){
elif [ "${1}" == "offsite" ]; then
/usr/bin/curl -s "https://systems:Dcs9613@wdns.scity.us/nic/update?hostname=offsite.scity.us&myip=${NEWIP}" > /dev/null 2>&1
/usr/bin/curl -s "https://systems:Dcs9613@wdns.scity.us/nic/update?hostname=backup.scity.us&myip=${NEWIP}" > /dev/null 2>&1
L_OLDIP=`dig +short offsite.scity.us @10.10.10.5 +time=2`
if ([ "${L_OLDIP}" != "" ] && [[ "${L_OLDIP}" != *";"* ]] && [ "${L_OLDIP}" != "${NEWIP}" ]) || [ "${2}" == "force" ]; then
/usr/bin/curl -s "https://systems:Dcs9613@dns.scity.us/nic/update?hostname=offsite.scity.us&myip=${NEWIP}" > /dev/null 2>&1
/usr/bin/curl -s "https://systems:Dcs9613@dns.scity.us/nic/update?hostname=backup.scity.us&myip=${NEWIP}" > /dev/null 2>&1
fi
fi
SENDNOTICE "${1^^} DYNDNS Updated" "Updated ${1^} WAN IP from '${OLDIP}' to '${NEWIP}'"
[ "${2}" != 'q' ] && echo -e "${idsCL[Green]}done${idsCL[Default]}"