diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 40b8e290..6018a6ec 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -177,11 +177,11 @@ STATUS(){ srvcs=${NTYPE}_SERVICES_CHECK[@]; srvcstotest="$(join_by " " ${!srvcs})" - [ "${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 - srvctst=(`${NCMD} systemctl is-active ${srvcstotest}`) - sr=0 - for srvc in "${!srvcs}"; do + srvctst=(`${NCMD} systemctl is-active ${srvcstotest}`) + sr=0 + for srvc in "${!srvcs}"; do + [ "${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 @@ -238,9 +238,8 @@ STATUS(){ fi [ "${mysqlgo}" = "true" ] && unset mysqlgo sr=`expr $sr + 1` - done - fi - + fi + done