Update nodemgmt-scripts.sh
This commit is contained in:
@@ -338,9 +338,7 @@ STATUS(){
|
|||||||
if [ ! -f ${FOLDER}/${nip}.errtime ]; then
|
if [ ! -f ${FOLDER}/${nip}.errtime ]; then
|
||||||
touch ${FOLDER}/${nip}.errtime
|
touch ${FOLDER}/${nip}.errtime
|
||||||
fi
|
fi
|
||||||
# if [ "${EMAIL_NOTICE}" != "" ]; then
|
# [ "${EMAIL_NOTICE}" != "" ] && echo "${NM_NODETYPES[$NTYPE]}-Node${nid} is down" | mail -s "${NM_NODETYPES[$NTYPE]}-Node${nid}-${nip}" ${EMAIL_NOTICE}
|
||||||
# echo "${NM_NODETYPES[$NTYPE]}-Node${nid} is down" | mail -s "${NM_NODETYPES[$NTYPE]}-Node${nid}-${nip}" ${EMAIL_NOTICE}
|
|
||||||
# fi
|
|
||||||
else
|
else
|
||||||
errtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.down)
|
errtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.down)
|
||||||
# if [ $errtime -gt ${RENOTIFY} ] && [ "${EMAIL_NOTICE}" != "" ]; then
|
# if [ $errtime -gt ${RENOTIFY} ] && [ "${EMAIL_NOTICE}" != "" ]; then
|
||||||
@@ -2243,7 +2241,7 @@ UPDATE_DYNDNS(){
|
|||||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=snsinvest.com&myip=${NEWIP}" > /dev/null 2>&1
|
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=snsinvest.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||||
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=misfitsmc.com&myip=${NEWIP}" > /dev/null 2>&1
|
/usr/bin/curl -s "https://systems:Dcs9613@pdns.scity.us/nic/update?hostname=misfitsmc.com&myip=${NEWIP}" > /dev/null 2>&1
|
||||||
|
|
||||||
echo "DYNDNS Updated" | mail -s "Updated WAN IP from '${OLDIP}' to '${NEWIP}'" 9208839613@mms.att.net
|
[ "${EMAIL_NOTICE}" != "" ] && echo "DYNDNS Updated" | mail -s "Updated WAN IP from '${OLDIP}' to '${NEWIP}'" ${EMAIL_NOTICE}
|
||||||
|
|
||||||
if [ "${1}" != 'q' ]; then
|
if [ "${1}" != 'q' ]; then
|
||||||
echo -e "${idsCL[Green]}Updated WAN IP from '${OLDIP}' to '${NEWIP}'${idsCL[Default]}"
|
echo -e "${idsCL[Green]}Updated WAN IP from '${OLDIP}' to '${NEWIP}'${idsCL[Default]}"
|
||||||
@@ -2424,7 +2422,7 @@ if [ ${action-x} ]; then
|
|||||||
rm -f ${FOLDER}/status-downlist.lastrun
|
rm -f ${FOLDER}/status-downlist.lastrun
|
||||||
DOWNLIST report >> ${FOLDER}/status-downlist.lastrun
|
DOWNLIST report >> ${FOLDER}/status-downlist.lastrun
|
||||||
STATUSLOG="$(cat ${FOLDER}/status-downlist.lastrun)"
|
STATUSLOG="$(cat ${FOLDER}/status-downlist.lastrun)"
|
||||||
echo -e "Downlist Report\n${STATUSLOG}" | mail -s "Downlist Report" 9208839613@mms.att.net
|
[ "${EMAIL_NOTICE}" != "" ] && echo -e "Downlist Report\n${STATUSLOG}" | mail -s "Downlist Report" ${EMAIL_NOTICE}
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
DOWNLIST ${2}
|
DOWNLIST ${2}
|
||||||
@@ -2444,7 +2442,7 @@ if [ ${action-x} ]; then
|
|||||||
echo -e "\n\n" >> ${FOLDER}/status-check.lastrun
|
echo -e "\n\n" >> ${FOLDER}/status-check.lastrun
|
||||||
DOWNLIST report >> ${FOLDER}/status-check.lastrun
|
DOWNLIST report >> ${FOLDER}/status-check.lastrun
|
||||||
STATUSLOG="$(cat ${FOLDER}/status-check.lastrun)"
|
STATUSLOG="$(cat ${FOLDER}/status-check.lastrun)"
|
||||||
echo -e "Status Report\n${STATUSLOG}" | mail -s "Status Report" 9208839613@mms.att.net
|
[ "${EMAIL_NOTICE}" != "" ] && echo -e "Status Report\n${STATUSLOG}" | mail -s "Status Report" ${EMAIL_NOTICE}
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
STATUS ${2} ${3}
|
STATUS ${2} ${3}
|
||||||
|
|||||||
Reference in New Issue
Block a user