This commit is contained in:
2023-12-05 18:16:13 -06:00
parent 673b83edf5
commit 56f5579d88
4 changed files with 23 additions and 23 deletions

View File

@@ -483,9 +483,9 @@ CHECK_DOCKER_SERVICES(){
fi
if [ -f ${NM_TMPFOLDER}/${nip}.down ]; then
if [ -f ${NM_TMPFOLDER}/${nip}.errtime ]; then
toterrtime=`expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.errtime)`
toterrtime=$(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.errtime))
else
toterrtime=`expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.down)`
toterrtime=$(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.down))
fi
rm -f ${NM_TMPFOLDER}/${nip}.down
rm -f ${NM_TMPFOLDER}/${nip}.errtime
@@ -527,10 +527,10 @@ CHECK_DOCKER_SERVICES(){
touch ${NM_TMPFOLDER}/${nip}.errtime
fi
else
errtime=`expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.down)`
errtime=$(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.down))
fi
if [ "${ST_ACTION}" != "check" ]; then
toterrtime=`expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.errtime)`
toterrtime=$(expr $(date +%s) - $(stat -c %Y ${NM_TMPFOLDER}/${nip}.errtime))
echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[Red]} - Node has been down for $(SHOW_TIME ${toterrtime}) ${idsCL[LightYellow]}${LH}${idsCL[Default]}"
fi
fi