Update nodemgmt-scripts.sh
This commit is contained in:
@@ -172,34 +172,6 @@ STATUS(){
|
||||
|
||||
if [ "$(${NCMD} systemctl is-active ${srvc})" != "active" ]; then
|
||||
if [ ! -f ${FOLDER}/${nip}-${srvc}.down ]; then
|
||||
# if [ "${srvc}" == "gitea" ]; then
|
||||
# if [ "$(${NCMD} systemctl is-active ${srvc})" != "active" ]; then
|
||||
# SERVICE gitea stop q
|
||||
# SET-PERMISSIONS gitea q
|
||||
# SERVICE gitea start q
|
||||
# fi
|
||||
# if [ "$(${NCMD} systemctl is-active ${srvc})" != "active" ]; then
|
||||
# if [ "${ST_ACTION}" != "check" ]; then
|
||||
# echo -e "${idsCL[Red]}Not Running - could not fix${idsCL[Default]}"
|
||||
# fi
|
||||
# if [ "${STATUS_CHECK_EMAIL}" != "" ]; then echo "${NM_SERVICES[${srvc}]} is down. Could not fix." | mail -s "${NM_NODETYPES[$NTYPE]}-Node${nid}-${nip}" ${STATUS_CHECK_EMAIL}; fi
|
||||
# touch ${FOLDER}/${nip}-${srvc}.down
|
||||
# else
|
||||
# if [ "${ST_ACTION}" != "check" ]; then
|
||||
# echo -e "${idsCL[Green]}Running - FIXED${idsCL[Default]}"
|
||||
# fi
|
||||
# if [ -f ${FOLDER}/${nip}-${srvc}.down ]; then
|
||||
# if [ -f ${FOLDER}/${nip}-${srvc}.errtime ]; then
|
||||
# toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}-${srvc}.errtime)
|
||||
# else
|
||||
# toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${nip}-${srvc}.down)
|
||||
# fi
|
||||
# if [ "${STATUS_CHECK_EMAIL}" != "" ]; then echo "${NM_SERVICES[${srvc}]} is back UP! (!!FIXED!!) It was down for $(SHOW_TIME ${toterrtime})" | mail -s "${NM_NODETYPES[$NTYPE]}-Node${nid}-${nip}" ${STATUS_CHECK_EMAIL}; fi
|
||||
# rm -f ${FOLDER}/${nip}-${srvc}.down
|
||||
# rm -f ${FOLDER}/${nip}-${srvc}.errtime
|
||||
# fi
|
||||
# fi
|
||||
# else
|
||||
|
||||
if [ "${ST_ACTION}" != "check" ]; then
|
||||
echo -e "${idsCL[Red]}Not Running${idsCL[Default]}"
|
||||
|
||||
Reference in New Issue
Block a user