Hi, 

A client of mine has multiple users who are able to start/stop the server. The issue though is that the person who starts the server is the only one who can stop it. 

Some research led to this site that explains how to use secret keys to allow for stopping the server http://www.eclipse.org/jetty/documentation/current/runner.html.


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:

> java -jar jetty-runner.jar --stop-port 8181 --stop-key abc123> 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. For this you’ll either need a local installation of jetty, the jetty-maven-plugin, the jetty-ant plugin, or write a custom class. Here’s how to use a jetty installation to perform a stop:

> java -jar start.jar --stop-port 8181 --stop-key abc123 --stop> java -jar start.jar --stop-port 8181 --stop-key abc123 --stop


In our case, Jetty is started through the BaseX start script. Is there any way we can use a secret key as explained above through the BaseX start/stop server scripts?

Thanks!

-- 
France Baril
Architecte documentaire / Documentation architect
france.baril@architextus.com

--
France Baril
Architecte documentaire / Documentation architect
france.baril@architextus.com