This commit is contained in:
2019-01-29 20:33:26 -06:00
parent 9702cf77ec
commit 6e5d7c2de0
2 changed files with 8 additions and 3 deletions

View File

@@ -13,7 +13,10 @@ source /opt/idssys/nodemgmt/defaults.inc
case "$1" in
service)
containsElement "${2}" "${NODE_SERVICES[@]}"
if [ ! containsElement "${2}" "${NODE_SERVICES[@]}" ] && [ ! containsElement "${2}" "${LOCAL_SERVICES[@]}" ]; then
echo -e "${idsCL[Red]}(${2}) is not an allowed service.${idsCL[Default]}"
exit 1
fi
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