diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index eb840dbb..d6e2ded0 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -110,7 +110,7 @@ case "$1" in do if [[ "mysql,nginx,gitea,haproxy,keepalived,maxscale" = *"${srvc}"* ]]; then spc=" "; else spc=""; fi echo -en "${NM_SERVICES[${srvc}]} $spc" - if [ $(pgrep ${srvc} | wc -l) -gt "0" ]; then + if [ $(pgrep ${srvc} | wc -l) -gt "1" ]; then echo -e "${idsCL[Green]}Running${idsCL[Default]}" else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}" fi @@ -130,7 +130,7 @@ case "$1" in do if [[ "mysql,nginx,gitea,haproxy,keepalived,maxscale" = *"${srvc}"* ]]; then spc=" "; else spc=""; fi echo -en "${NM_SERVICES[${srvc}]} $spc" - if [ $(${NCMD} pgrep ${srvc} | wc -l) -gt "0" ]; then + if [ $(${NCMD} pgrep ${srvc} | wc -l) -gt "1" ]; then echo -e "${idsCL[Green]}Running${idsCL[Default]}" else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}" fi