diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index ce467348..d50c4213 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -741,6 +741,7 @@ MAINTENANCE_MODE(){ fi PRI_CW=40 + DV_LEN=90 declare -i cw; declare -i spc1; declare -i c item_number=1 @@ -758,18 +759,13 @@ MAINTENANCE_MODE(){ if [ ${GOFORCHECK} = true ]; then - if [ "${MM_ACTION}" != "check" ]; then - echo -en "${idsST[Bold]}"; DIVIDER - if [ "${MM_ACTION}" == "dockers" ]; then - echo -e "${idsCL[LightYellow]} ${NM_NODETYPES[$NTYPE]}-Node Docker Status${idsCL[Default]}" - else - echo -e "${idsCL[LightYellow]} ${NM_NODETYPES[$NTYPE]}-Node Service Status${idsCL[Default]}" - fi - DIVIDER . lightYellow 52; echo -en "${idsST[Reset]}" - fi + echo -en "${idsST[Bold]}"; DIVIDER . lightYellow ${DV_LEN} + echo -e "${idsCL[LightYellow]} ${NM_NODETYPES[$NTYPE]}-Node Status Checks${idsCL[Default]}" + DIVIDER . lightYellow ${DV_LEN}; echo -en "${idsST[Reset]}" + for nip in "${!hosts}"; do echo -e " ${idsST[Bold]}${idsCL[LightCyan]}${NM_HOSTNAMES[${nip}]} [${nip}]${idsST[Reset]}${idsCL[Default]}" - DIVIDER false lightCyan 52 + DIVIDER false lightCyan ${DV_LEN} ######################## @@ -777,7 +773,7 @@ MAINTENANCE_MODE(){ ######################## if [ "${MM_ACTION}" != "dockers" ] && [ "${NM_SERVICES_CHECK[${NTYPE}]}" != "" ]; then echo -e "${idsCL[Green]} System Service(s)${idsCL[Default]}" - DIVIDER . green 52 + DIVIDER . green ${DV_LEN} for srvc in "${!srvcs}"; do if [ ${item_number} -lt 10 ]; then isel=" ${item_number})"; elif [ ${item_number} -lt 100 ]; then isel=" ${item_number})"; else isel=" ${item_number})"; fi @@ -796,7 +792,7 @@ MAINTENANCE_MODE(){ if [[ -v ${NTYPE}_DOCKERS_CHECK ]] && [ "${MM_ACTION}" != "services" ]; then [ "${MM_ACTION}" == "" ] && [ "${NM_SERVICES_CHECK[${NTYPE}]}" != "" ] && echo echo -e "${idsCL[Green]} Docker Service(s)${idsCL[Default]}" - DIVIDER . green 52 + DIVIDER . green ${DV_LEN} for docker in "${!dockers}"; do if [ ${item_number} -lt 10 ]; then isel=" ${item_number})"; elif [ ${item_number} -lt 100 ]; then isel=" ${item_number})"; else isel=" ${item_number})"; fi @@ -819,14 +815,14 @@ MAINTENANCE_MODE(){ if ([ "${STATUS_ACTION}" == "repl" ] || [ "${STATUS_ACTION}" == "" ]) && [ ! -z ${!repls+x} ]; then if [ "${MM_ACTION}" != "check" ]; then echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${NM_NODETYPES[${NTYPE}]} Replication Check(s)${idsST[Reset]}${idsCL[Default]}" - DIVIDER . lightCyan 52 + DIVIDER . lightCyan ${DV_LEN} fi PH=${NTYPE}_HOSTS[0] PH_CMD="ssh root@${!PH}" var2=${NTYPE}_HOSTS[@] for nip in "${!hosts}"; do echo -e " ${idsCL[Green]}${NM_HOSTNAMES[${!PH}]}[${!PH}] <--> ${idsST[Bold]}${NM_HOSTNAMES[${nip}]}[${nip}]${idsST[Reset]}${idsCL[Default]}" - DIVIDER . green 52 + DIVIDER . green ${DV_LEN} for rcheck in "${!repls}"; do if [ ${item_number} -lt 10 ]; then isel=" ${item_number})"; elif [ ${item_number} -lt 100 ]; then isel=" ${item_number})"; else isel=" ${item_number})"; fi c=0; spc=''; spc1=`expr ${PRI_CW} - ${#NM_REPL_DESC[${rcheck}]}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done