Update nodemgmt-scripts.sh
This commit is contained in:
@@ -418,15 +418,14 @@ STATUS(){
|
|||||||
|
|
||||||
# checkhost=$(CHECK_HOST ${nip})
|
# checkhost=$(CHECK_HOST ${nip})
|
||||||
#if [ "${checkhost}" != "false" ]; then
|
#if [ "${checkhost}" != "false" ]; then
|
||||||
if [ ! -f ${FOLDER}/${!PH}.down ] || [ ! -f ${FOLDER}/${nip}.down ]; then
|
if [ ! -f ${FOLDER}/${!PH}.down ] && [ ! -f ${FOLDER}/${nip}.down ]; then
|
||||||
if [ -f ${FOLDER}/${nip}.down ]; then
|
if [ -f ${FOLDER}/${nip}.down ]; then
|
||||||
if [ -f ${FOLDER}/${nip}.errtime ]; then
|
if [ -f ${FOLDER}/${nip}.errtime ]; then
|
||||||
toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.errtime)
|
toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.errtime)
|
||||||
else
|
else
|
||||||
toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.down)
|
toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}.down)
|
||||||
fi
|
fi
|
||||||
rm -f ${FOLDER}/${nip}.down
|
|
||||||
rm -f ${FOLDER}/${nip}.errtime
|
|
||||||
SENDNOTICE "${NM_NODETYPES[$NTYPE]}-Node${nid}-${nip}-UP" "${NM_NODETYPES[$NTYPE]}-Node${nid} is back UP! It was down for $(SHOW_TIME ${toterrtime})"
|
SENDNOTICE "${NM_NODETYPES[$NTYPE]}-Node${nid}-${nip}-UP" "${NM_NODETYPES[$NTYPE]}-Node${nid} is back UP! It was down for $(SHOW_TIME ${toterrtime})"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user