diff --git a/assemble/bin/accumulo-service b/assemble/bin/accumulo-service index 17da2f8b547..2300e7f74a5 100755 --- a/assemble/bin/accumulo-service +++ b/assemble/bin/accumulo-service @@ -32,15 +32,15 @@ Services: all All services (list command only) Commands: start Starts service(s) - stop [--all | []] Stops service(s) - kill [--all | []] Kills service(s) + stop [--all | ] Stops service(s) + kill [--all | ] Kills service(s) list [--json] List running service(s) EOF } function invalid_args { - echo -e "Invalid arguments: $1\n" + echo -e "Invalid arguments: $1\n" 1>&2 print_usage 1>&2 exit 1 } @@ -339,6 +339,9 @@ function main() { if [[ -z $command_name ]]; then invalid_args " cannot be empty" fi + if [[ $command_name =~ ^(stop|kill)$ && $all_flag != 'true' && -z $ACCUMULO_CLUSTER_ARG && -z $service_name ]]; then + invalid_args "'$command_name' requires --all or a service (e.g. ${service}_${group}_1; see '$service list')" + fi case "$command_name" in start) start_service "$service" "$service_name" "$@"