Update status.inc

This commit is contained in:
2023-11-25 21:40:20 -06:00
parent 88493f7460
commit a13158c6ae

View File

@@ -108,7 +108,7 @@ STATUS(){
fi
else
if [ "${ST_ACTION}" != "check" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
echo -e "${idsST[Bold]}${idsCL[Green]}Running${idsCL[Default]}${idsST[Reset]}"
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 "${idsCL[Green]}Running${idsCL[Default]}"
[ "${ST_ACTION}" != "check" ] && echo -e "${idsST[Bold]}${idsCL[Green]}Running${idsCL[Default]}${idsST[Reset]}"
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 "${idsCL[Green]}Running${idsCL[Default]}"
# echo -e "${idsST[Bold]}${idsCL[Green]}Running${idsCL[Default]}${idsST[Reset]}"
# fi
# if [ -f ${NM_TMPFOLDER}/${nip}~${srvc}.down ]; then
# if [ -f ${NM_TMPFOLDER}/${nip}~${srvc}.errtime ]; then
@@ -366,9 +366,9 @@ STATUS(){
if [[ -v ${NTYPE}_DOCKERS_CHECK ]] && [ "${ST_ACTION}" != "services" ]; then
if [ "${ST_ACTION}" != "check" ]; then
echo
echo -e "${idsCL[LightBlue]} Docker Service(s) Status${idsCL[Default]}"
echo -e "${idsCL[Green]} Docker Service(s) Status${idsCL[Default]}"
# echo -e "${idsCL[LightYellow]}----------------------------------------------------${idsCL[Default]}"
DIVIDER . lightBlue 52
DIVIDER . green 52
fi
for docker in "${!dockers}"; do
if [ "${NTYPE}" == "WEB" ]; then
@@ -431,7 +431,7 @@ STATUS(){
fi
else
if [ "${ST_ACTION}" != "check" ]; then
echo -e "${idsCL[Green]}Running${idsCL[Default]}"
echo -e "${idsST[Bold]}${idsCL[Green]}Running${idsCL[Default]}${idsST[Reset]}"
fi
rm -f ${NM_TMPFOLDER}/${nip}~${docker}.*
fi