Update nodemgmt-scripts.sh

This commit is contained in:
2023-11-15 08:47:13 -06:00
parent 8b04117bb9
commit e8e38b1f07

View File

@@ -533,10 +533,10 @@ UPDATE_DYNDNS(){
fi
if [ "${NM_DYNUSER}" != "" ] && [ "${NM_DYNPASS}" != "" ]; then
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
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