Update nodemgmt-scripts.sh
This commit is contained in:
@@ -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 ... "
|
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
|
else
|
||||||
SENDNOTICE "${LOCATION^^} WAN IP Changed" "Updated '${LOCATION^}' WAN IP from '${OLDIP}' to '${NEWIP}'"
|
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
|
fi
|
||||||
if [ "${NM_DYNUSER}" != "" ] && [ "${NM_DYNPASS}" != "" ]; then
|
if [ "${NM_DYNUSER}" != "" ] && [ "${NM_DYNPASS}" != "" ]; then
|
||||||
if [ "$(/usr/bin/curl -m 3 -s "https://${NM_DYNUSER}:${NM_DYNPASS}@wdns.scity.us/nic/update")" != "" ]; 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
|
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
|
/usr/bin/curl -s "https://${NM_DYNUSER}:${NM_DYNPASS}@wdns.scity.us/nic/update?hostname=${host}&myip=${NEWIP}" > /dev/null 2>&1
|
||||||
done
|
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
|
[ "${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
|
||||||
|
|||||||
Reference in New Issue
Block a user