Hi France,

I don't think this is possible using the BaseX start script. However, is there any particular reason why you wouldn't use the command you cited here from the documentation?

The problem in this case with the BaseX start script is that BaseX starts Jetty as an embedded service and I don't think we have a mechanism in this to pass on parameters to Jetty. However, using the jetty-runner you can achieve the same result, just the other way round: you start jetty and embed Jetty. This way you can also add the necessary starting parameters to Jetty.

Of course you are also free to write a shell script like the BaseX start scripts to simplify startup.

Cheers,
Dirk

PS: For anyone wondering: Our head architect Christian is on vacation, so for a while you will have to live with us mere humans left in the office for support.

On 05/08/2016 08:12 PM, France Baril wrote:
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


-- 
Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
|   Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle
`-- Phone: 0049 7531 91 68 276, Fax: 0049 7531 20 05 22