diff options
author | HÃ¥kon Hallingstad <hakon@oath.com> | 2018-01-23 10:01:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-23 10:01:24 +0100 |
commit | e051847d1b87c8a1f5bd0a1386946aae78b1e3ab (patch) | |
tree | 137ba7f8c2d7fdf2eac9f3396c796fdade893888 /standalone-container | |
parent | 81a0bae3aa618b13eb1dc9d79b01666155fe8748 (diff) |
Revert "Redefine task and its context"
Diffstat (limited to 'standalone-container')
-rwxr-xr-x | standalone-container/src/main/sh/standalone-container.sh | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/standalone-container/src/main/sh/standalone-container.sh b/standalone-container/src/main/sh/standalone-container.sh index 02c71beaac5..dd0693f6f85 100755 --- a/standalone-container/src/main/sh/standalone-container.sh +++ b/standalone-container/src/main/sh/standalone-container.sh @@ -67,7 +67,6 @@ Manage Vespa standalone jdisc container service. Options: -u USER Run as USER. Overrides any VESPA_USER environment variable. -s SERVICE The service name. - -- ARGS... Pass the rest of the arguments (ARGS) to the Java invocation EOF exit 1 @@ -90,19 +89,16 @@ FixDataDirectory() { StartCommand() { local service="$1" shift - local -a jvm_arguments=("$@") + + if (( $# > 0 )); then + Fail "Too many arguments" + fi local service_regex='^[0-9a-zA-Z_-]+$' if ! [[ "$service" =~ $service_regex ]]; then Fail "Service must match regex '$service_regex'" fi - local pidfile="$VESPA_HOME/var/run/$service.pid" - if test -r "$pidfile"; then - echo "$service is already running as PID $(< "$pidfile") according to $pidfile" - return - fi - # common setup export VESPA_SERVICE_NAME="$service" @@ -139,7 +135,6 @@ StartCommand() { FixDataDirectory "$bundlecachedir" java \ - "${jvm_arguments[@]}" \ -Xms128m -Xmx2048m \ -XX:+PreserveFramePointer \ -XX:+HeapDumpOnOutOfMemoryError \ @@ -272,7 +267,6 @@ Main() { local service="standalone/container" local user="$VESPA_USER" - local -a jvm_arguments=() while (( $# > 0 )); do case "$1" in @@ -285,11 +279,6 @@ Main() { user="$2" shift 2 ;; - --) - shift - jvm_arguments=("$@") - break - ;; *) break ;; esac done @@ -311,7 +300,7 @@ Main() { case "$command" in help) Usage ;; - start) StartCommand "$service" "${jvm_arguments[@]}" ;; + start) StartCommand "$service" "$@" ;; stop) StopCommand "$user" "$service" "$@" ;; *) Fail "Unknown command '$command'" ;; esac |