Update status.inc

This commit is contained in:
2023-11-25 21:51:53 -06:00
parent 7f30e65625
commit 0fffeab7b2

View File

@@ -108,7 +108,7 @@ STATUS(){
fi
else
if [ "${ST_ACTION}" != "check" ]; then
echo -e "${idsST[Bold]}${idsCL[LightGreen]}Running${idsCL[Default]}${idsST[Reset]}"
echo -e "${idsCL[LightGreen]}Running${idsCL[Default]}"
fi
if [ -f ${NM_TMPFOLDER}/${NODE_HOSTNAME}~${srvc}.down ]; then
if [ -f ${NM_TMPFOLDER}/${NODE_HOSTNAME}~${srvc}.errtime ]; then
@@ -262,7 +262,7 @@ STATUS(){
[ "${ST_ACTION}" != "check" ] && echo -e "${idsCL[Red]}Not running for $(SHOW_TIME ${toterrtime})${idsCL[Default]}"
fi
else
[ "${ST_ACTION}" != "check" ] && echo -e "${idsST[Bold]}${idsCL[LightGreen]}Running${idsCL[Default]}${idsST[Reset]}"
[ "${ST_ACTION}" != "check" ] && echo -e "${idsCL[LightGreen]}Running${idsCL[Default]}"
if [ -f ${NM_TMPFOLDER}/${nip}~${srvc}.down ]; then
[ -f ${NM_TMPFOLDER}/${nip}~${srvc}.errtime ] && toterrtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}~${srvc}.errtime) || toterrtime=`date +%s`-$(stat -c %Y ${NM_TMPFOLDER}/${nip}~${srvc}.down)
SENDNOTICE "${NM_HOSTNAMES[${nip}]}[${nip}]" "${NM_SERVICE_DESC[${srvc}]} is back UP! It was down for $(SHOW_TIME ${toterrtime})"
@@ -334,7 +334,7 @@ STATUS(){
# fi
# else
# if [ "${ST_ACTION}" != "check" ]; then
# echo -e "${idsST[Bold]}${idsCL[LightGreen]}Running${idsCL[Default]}${idsST[Reset]}"
# echo -e "${idsCL[LightGreen]}Running${idsCL[Default]}"
# fi
# if [ -f ${NM_TMPFOLDER}/${nip}~${srvc}.down ]; then
# if [ -f ${NM_TMPFOLDER}/${nip}~${srvc}.errtime ]; then
@@ -431,7 +431,7 @@ STATUS(){
fi
else
if [ "${ST_ACTION}" != "check" ]; then
echo -e "${idsST[Bold]}${idsCL[LightGreen]}Running${idsCL[Default]}${idsST[Reset]}"
echo -e "${idsCL[LightGreen]}Running${idsCL[Default]}"
fi
rm -f ${NM_TMPFOLDER}/${nip}~${docker}.*
fi