From 3cdedf4fd63cdbb59989c1171e03391b2c7b8cf7 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 27 Apr 2023 09:35:38 -0500 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index cb5da76e..f45c3029 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -179,19 +179,17 @@ STATUS(){ [ "${srvc}" == "gitea" ] && [ "${NTYPE}" == "WEB" ] && [[ $($NCMD /sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1) != *${WEB_HOSTS[0]}* ]] && NOGOCHK=false || NOGOCHK=true if [ ${NOGOCHK} == true ]; then - if [ "${ST_ACTION}" != "check" ]; then - if [ "${ST_ACTION}" != "report" ]; then - c=0; cw=30; spc=''; spc1=${cw}-${#NM_SERVICES[${srvc}]}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - else - spc=' ' - fi - echo -en " ${NM_SERVICES[${srvc}]}$spc: " - fi - srvctst=(`${NCMD} systemctl is-active ${srvcstotest}`) - sr=0 for srvc in "${srvcs}"; do + if [ "${ST_ACTION}" != "check" ]; then + if [ "${ST_ACTION}" != "report" ]; then + c=0; cw=30; spc=''; spc1=${cw}-${#NM_SERVICES[${srvc}]}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + else + spc=' ' + fi + echo -en " ${NM_SERVICES[${srvc}]}$spc: " + fi if [ "${srvctst[$sr]}" != "active" ] && [ "${srvc}" = "mysql" ]; then mysqlgo=false; [ "$(${NCMD} systemctl is-active mariadb)" = "active" ] && mysqlgo=true;