diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 778184e7..92e94f71 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1253,8 +1253,8 @@ SERVICE(){ echo -e "${idsCL[Red]}(${1}) is not an allowed service.${idsCL[Default]}" exit 1 fi - if [[ "start,stop,restart,reload,enable,disable" != *"${2}"* ]] && [ "${1}" != "daemon-reload" ]; then - echo -e "${idsCL[Red]}(${3}) is not an allowed service action.${idsCL[Default]}" + if [ "${NM_SRVCOPTS[${2}]}" = "" ]; then + echo -e "${idsCL[Red]}(${2}) is not an allowed service action.${idsCL[Default]}" exit 1 fi if [ "$2" = "start" ] && [ "$1" = "haproxy" ]; then TACT='restart'; else TACT="${2}"; fi