Update nodemgmt-scripts.sh

This commit is contained in:
2023-11-15 08:38:49 -06:00
parent 26301d2411
commit 266114fde9

View File

@@ -529,11 +529,12 @@ UPDATE_DYNDNS(){
echo -en "${idsCL[Yellow]}'${idsCL[LightCyan]}${LOCATION^^}${idsCL[Yellow]}' WAN IP has not changed...\n${idsCL[Green]}but what the heck, lets update the records anyway ehh ... "
else
SENDNOTICE "${LOCATION^^} WAN IP Changed" "Updated '${LOCATION^}' WAN IP from '${OLDIP}' to '${NEWIP}'"
echo -en "${idsCL[Green]}'${idsCL[LightCyan]}${LOCATION^^}${idsCL[Green]}' WAN IP has changed, updating all pre-defined 'A' records ... "
echo -e "${idsCL[Green]}'${idsCL[LightCyan]}${LOCATION^^}${idsCL[Green]}' WAN IP has changed, updating all pre-defined 'A' records ... "
fi
if [ "${NM_DYNUSER}" != "" ] && [ "${NM_DYNPASS}" != "" ]; then
if [ "$(/usr/bin/curl -m 3 -s "https://${NM_DYNUSER}:${NM_DYNPASS}@wdns.scity.us/nic/update")" != "" ]; then
for host in ${DYNDNS_HOSTS[@]}; do
echo "updating: $host"
/usr/bin/curl -s "https://${NM_DYNUSER}:${NM_DYNPASS}@wdns.scity.us/nic/update?hostname=${host}&myip=${NEWIP}" > /dev/null 2>&1
done
[ "${LOCATION,,}" == "mainsite" ] && /usr/bin/curl -s "https://${NM_DYNUSER}:${NM_DYNPASS}@dns.scity.us/nic/update?hostname=sc1.scity.us&myip=${NEWIP}" > /dev/null 2>&1