Update nodemgmt-scripts.sh

This commit is contained in:
2023-04-27 10:05:19 -05:00
parent a9586f5b0d
commit 676bff86cc

View File

@@ -177,11 +177,11 @@ STATUS(){
srvcs=${NTYPE}_SERVICES_CHECK[@]; srvcs=${NTYPE}_SERVICES_CHECK[@];
srvcstotest="$(join_by " " ${!srvcs})" 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 srvctst=(`${NCMD} systemctl is-active ${srvcstotest}`)
if [ ${NOGOCHK} == true ]; then sr=0
srvctst=(`${NCMD} systemctl is-active ${srvcstotest}`) for srvc in "${!srvcs}"; do
sr=0 [ "${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
for srvc in "${!srvcs}"; do if [ ${NOGOCHK} == true ]; then
if [ "${ST_ACTION}" != "check" ]; then if [ "${ST_ACTION}" != "check" ]; then
if [ "${ST_ACTION}" != "report" ]; 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 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 fi
[ "${mysqlgo}" = "true" ] && unset mysqlgo [ "${mysqlgo}" = "true" ] && unset mysqlgo
sr=`expr $sr + 1` sr=`expr $sr + 1`
done fi
fi done