From c76467bd341306d5ba7f1208dd1ea6e2aa436986 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 31 Dec 2022 17:41:34 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 6c31f380..6d635374 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -2263,16 +2263,16 @@ DOWNLIST(){ ditem=${ditem//.down} host=${ditem%%-*} item=${ditem#*-} - echo "'$item'" + if [[ $ditem == *"-"* ]] && [ "${NM_SERVICES[${item}]}" != "" ]; then - item=${NM_SERVICES[${ditem#*-}]} + itemname=${NM_SERVICES[${ditem#*-}]} elif [[ $ditem == *"-"* ]] && [ "${NM_DOCKERS[${item}]}" != "" ]; then - item="${NM_DOCKERS[${ditem#*-}]} (docker)" + itemname="${NM_DOCKERS[${ditem#*-}]} (docker)" elif [[ $ditem == *"-"* ]] && [ "${REPL_DESC[${item}]}" != "" ]; then - item=${REPL_DESC[${item}]} - item="${item} (replication)" + itemname=${REPL_DESC[${item}]} + itemname="${itemname} (replication)" else - item='HOST DOWN'; + itemname='HOST DOWN'; fi if [ -f ${FOLDER}/${ditem}.errtime ]; then @@ -2282,13 +2282,13 @@ DOWNLIST(){ fi c=0; spc='' - spc1=${cw}-${#item} - #echo "HERE: $downitem ~ $ditem ~ $host ~ $item ~ $spc1" + spc1=${cw}-${#itemname} + #echo "HERE: $downitem ~ $ditem ~ $host ~ $item ~ $itemname ~ $spc1" until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done c=0; spc2='' - spc1=${cw2}-${#item}-${#host}-${spc1} + spc1=${cw2}-${#itemname}-${#host}-${spc1} until [ $c = ${spc1} ]; do spc2="${spc2} "; c=`expr $c + 1`; done - echo -e "${idsST[Bold]}${idsCL[Red]}${item}${spc}${host}${spc2}$(SHOW_TIME ${toterrtime})${idsST[Reset]}${idsCL[Default]}" + echo -e "${idsST[Bold]}${idsCL[Red]}${itemname}${spc}${host}${spc2}$(SHOW_TIME ${toterrtime})${idsST[Reset]}${idsCL[Default]}" DIVIDER false darkGray done echo