diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 6bbcb77f..13a6f5a8 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -34,7 +34,7 @@ case "$1" in do echo -en "${ADISP}ing Node ${nid} ($nip)...${idsCL[Default]}" ssh root@${nip} systemctl $3 $2 - if [[ $(ssh root@${nip} ps -ef | grep -c ${2}) -ne 1 ]]; then + if [[ $(is_service_runing ${nip} ${2}) = "0" ]]; then echo -e "${idsCL[Green]}OK${idsCL[Default]}" else echo -e "${idsCL[Red]}ERROR${idsCL[Default]}" fi