From 8b04117bb95c4ef38409389bb296cfe88d8b49a3 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 15 Nov 2023 08:40:40 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 8f5db976..11982e9b 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -526,17 +526,17 @@ UPDATE_DYNDNS(){ echo -e "${idsCL[Green]}'${idsCL[LightCyan]}${LOCATION^^}${idsCL[Green]}' WAN IP has changed: ${idsCL[Yellow]}testmode active and will not update records${idsCL[Default]}" else if [ ${FORCE} -eq 1 ]; then - 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 ... " + echo -e "${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 -e "${idsCL[Green]}'${idsCL[LightCyan]}${LOCATION^^}${idsCL[Green]}' WAN IP has changed, updating all pre-defined 'A' records ... " + echo -en "${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 + if [ "$(curl -m 3 -sL "https://${NM_DYNUSER}df:${NM_DYNPASS}@wdns.scity.us/domain/${domain}" | grep "HTTP 403 Error")" == "" ]; 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 echo -e "${idsCL[Green]}Done${idsCL[Default]}" else