From 1fb8b2e4ad70202a14717e2faff2f4c2c13f51f4 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Thu, 9 Nov 2017 13:01:24 -0500 Subject: [PATCH] Updated documentation for Jetty Runner. Resolves #1550 --- .../asciidoc/administration/runner/jetty-runner.adoc | 9 ++++----- .../src/main/java/org/eclipse/jetty/runner/Runner.java | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/jetty-documentation/src/main/asciidoc/administration/runner/jetty-runner.adoc b/jetty-documentation/src/main/asciidoc/administration/runner/jetty-runner.adoc index 45c4006ad4c..2843a1dd76e 100644 --- a/jetty-documentation/src/main/asciidoc/administration/runner/jetty-runner.adoc +++ b/jetty-documentation/src/main/asciidoc/administration/runner/jetty-runner.adoc @@ -143,8 +143,8 @@ Server opts: --out file - info/warn/debug log filename (with optional 'yyyy_mm_dd' wildcard --host name|ip - interface to listen on (default is all interfaces) --port n - port to listen on (default 8080) - --stop-port n - port to listen for stop command - --stop-key n - security string for stop command (required if --stop-port is present) + --stop-port n - port to listen for stop command (or -DSTOP.PORT=n) + --stop-key n - security string for stop command (required if --stop-port is present) (or -DSTOP.KEY=n) [--jar file]*n - each tuple specifies an extra jar to be added to the classloader [--lib dir]*n - each tuple specifies an extra directory of jars to be added to the classloader [--classes dir]*n - each tuple specifies an extra directory of classes to be added to the classloader @@ -202,12 +202,11 @@ To link:#how-to-configure-connectors[configure a https connector], use a Jetty x ===== Configuring Stop You can configure a port number for jetty to listen on for a stop command, so you are able to stop it from a different terminal. This requires the use of a "secret" key, to prevent malicious or accidental termination. -Use the `--stop-port` and `--stop-key` parameters as arguments to the `jetty-runner`: +Use the `--stop-port` and `--stop-key` (or `-DSTOP.PORT=` and `-DSTOP.KEY=`, respectively) parameters as arguments to the `jetty-runner`: [source, screen, subs="{sub-order}"] .... > java -jar jetty-runner.jar --stop-port 8181 --stop-key abc123 - .... Then, to stop Jetty from a different terminal, you need to supply the same port and key information. @@ -216,7 +215,7 @@ Here's how to use a Jetty installation to perform a stop: [source, screen, subs="{sub-order}"] .... -> java -jar start.jar --stop-port 8181 --stop-key abc123 --stop +> java -jar start.jar -DSTOP.PORT=8181 -DSTOP.KEY=abc123 --stop .... ===== Configuring the Container Classpath diff --git a/jetty-runner/src/main/java/org/eclipse/jetty/runner/Runner.java b/jetty-runner/src/main/java/org/eclipse/jetty/runner/Runner.java index dfd78d1d241..c3e7877ee9f 100644 --- a/jetty-runner/src/main/java/org/eclipse/jetty/runner/Runner.java +++ b/jetty-runner/src/main/java/org/eclipse/jetty/runner/Runner.java @@ -166,8 +166,8 @@ public class Runner System.err.println(" --out file - info/warn/debug log filename (with optional 'yyyy_mm_dd' wildcard"); System.err.println(" --host name|ip - interface to listen on (default is all interfaces)"); System.err.println(" --port n - port to listen on (default 8080)"); - System.err.println(" --stop-port n - port to listen for stop command (or -DSTOP.PORT)"); - System.err.println(" --stop-key n - security string for stop command (required if --stop-port is present) (or -DSTOP.KEY)"); + System.err.println(" --stop-port n - port to listen for stop command (or -DSTOP.PORT=n)"); + System.err.println(" --stop-key n - security string for stop command (required if --stop-port is present) (or -DSTOP.KEY=n)"); System.err.println(" [--jar file]*n - each tuple specifies an extra jar to be added to the classloader"); System.err.println(" [--lib dir]*n - each tuple specifies an extra directory of jars to be added to the classloader"); System.err.println(" [--classes dir]*n - each tuple specifies an extra directory of classes to be added to the classloader");