diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 34b84bab..1ba61f72 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -14,7 +14,7 @@ source /opt/idssys/nodemgmt/defaults.inc case "$1" in service) containsElement "${2}" "${NODE_SERVICES[@]}" - if [[ "start,stop,restart,enable,disable" != *"${3}"* ]] && [ "${2}" != "reload-daemon" ]; then + if [[ "start,stop,restart,enable,disable" != *"${3}"* ]] && [ "${2}" != "daemon-reload" ]; then echo -e "${idsCL[Red]}(${3}) is not an allowed service action.${idsCL[Default]}" exit 1 fi @@ -47,7 +47,9 @@ case "$1" in fi echo -en "${ADISP}ing on Node ${nid} ($nip)...${idsCL[Default]}" $NCMD systemctl $3 $2 - if [[ $(${NCMD} pgrep ${2} | wc -l) -gt "0" ]]; then + if [[ "enable,disable" = *"${3}"* ]] || [ "${2}" = "daemon-reload" ]; then + echo -e "${idsCL[Green]}OK${idsCL[Default]}" + elif [[ $(${NCMD} pgrep ${2} | wc -l) -gt "0" ]]; then echo -e "${idsCL[Green]}OK${idsCL[Default]}" elif [ "$3" = "stop" ]; then echo -e "${idsCL[Red]}STOPPED${idsCL[Default]}" else echo -e "${idsCL[Red]}ERROR${idsCL[Default]}"