From 2b52ed44a347d8dc4d862e2db2b46142b9ecac18 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 31 Dec 2022 17:28:33 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 67230eec..92417ffe 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -2264,8 +2264,13 @@ DOWNLIST(){ ditem=${ditem//.down} host=${ditem%%-*} item=${ditem#*-} - if [[ $ditem == *"-"* ]]; then item=${NM_SERVICES[${ditem#*-}]}; - else item='HOST DOWN'; fi + if [[ $ditem == *"-"* ]] && [ "${NM_SERVICES[${ditem#*-}]}" != "" ]; then + item=${NM_SERVICES[${ditem#*-}]}; + elif [[ $ditem == *"-"* ]] && [ "${NM_DOCKERS[${ditem#*-}]}" != "" ]; then + item="${NM_DOCKERS[${ditem#*-}]} (docker)"; + else + item='HOST DOWN'; + fi if [ -f ${FOLDER}/${ditem}.errtime ]; then toterrtime=`date +%s`-$(stat -c %Y ${FOLDER}/${ditem}.errtime)