Update nodemgmt-scripts.sh

This commit is contained in:
2023-11-14 15:46:17 -06:00
parent f68caae819
commit 897437bdca

View File

@@ -542,8 +542,10 @@ UPDATE_DYNDNS(){
echo -e "${idsCL[Green]}${NEWIP}"
echo
if ([ "${OLDIP}" != "" ] && [ "${NEWIP}" != "" ] && [[ "${OLDIP}" != *";"* ]] && [[ "${NEWIP}" != *";"* ]] && [ "${OLDIP}" != "${NEWIP}" ]) || [ ${FORCE} -eq 1 ]; then
echo -en "${idsCL[Green]}${LOCATION^} WAN IP has changed, updating records ... "
if ([ "${OLDIP}" != "" ] && [ "${NEWIP}" != "" ] && [[ "${OLDIP}" != *";"* ]] && [[ "${NEWIP}" != *";"* ]] && [ "${OLDIP}" == "${NEWIP}" ]) || [ ${FORCE} -eq 1 ]; then
echo -en "${idsCL[Green]}${LOCATION^} WAN IP has changed, ";
[ ${TESTMODE} -eq 1 ] && echo -e "${idsCL[Yellow]}testmode active and will not update rcords"
echo -en ", updating records ... "
if [ "${LOCATION}" == "mainsite" ]; then
#external dns
/usr/bin/curl -s "https://${NM_DYNUSER}:${NM_DYNPASS}@wdns.scity.us/nic/update?hostname=sc1.scity.us&myip=${NEWIP}" > /dev/null 2>&1