From 3ac104d1df5d7035cf60c6c7f9b5f03c9a22fe91 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 24 Jul 2022 17:25:41 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 07ee2104..8c1b1af3 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1854,7 +1854,11 @@ DOWNLIST(){ if [[ $ditem == *"-"* ]]; then item=${NM_SERVICES[${ditem#*-}]}; else item='HOST DOWN'; fi - toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${ditem}.errtime) + if [ -f ${FOLDER}/${ditem}.errtime ]; then + toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${ditem}.errtime) + else + toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${ditem}.down) + fi c=0; spc='' spc1=${cw}-${#item}