I'm looking for a way to allow my service to temporarily start a second process. For instance to have the process start with a specific command-line flag, --status for example. The process should start, and dump some status info and quit again.
Obviously the Wrapper does not allow this, since the main process is already running. Any idea how we could accomplish this?
Can you explain a bit more what you are wanting to do? How is the second process triggered?
The Wrapper lets you launch managed child processes with the WrapperManager.exec method. Similar to the Runtime.exec, but you have more control over forking, and the Wrapper will manage the lifecycles of the child processes. It is also possible to trigger child processes in response to events. These are both Pro features however.
For instance say I'd want to run my Java process to dump some status
information and then exit, while the main application keeps running. Since
the entire startup of the application is configured in the service-wrapper,
with alle dependencies, jar files, etc., it would be ideal to have the
wrapper start the process. I'd run something like /path-to/myapp.sh status
or even sudo service myapp mystatus.
But since the main process is already running, the wrapper won't let me
start it again, which makes sense. I only wonder if there is a way around
this.
Hope this makes sense.
Op di 21 sep. 2021 om 02:57 schreef Leif Mortenson mortenson@users.sourceforge.net:
Related
Support Requests: #307
Mark,
In order to run a second service, you will need to have a second
wrapper.conf file which specifies its own service name, log file name, pid
file name, etc.
If the majority of the configuration between the two wrapper.confs will be
the same then you can take advantage of the #include functionality to move
all of the common properties into a wrapper-common.conf file.
https://wrapper.tanukisoftware.com/doc/english/props-cascading.html
It is possible to specify the included file names based on any of the
WRAPPER_* environment variables as well if you need to include anything
based on the platform for example.
https://wrapper.tanukisoftware.com/doc/english/props-envvars.html
Missing include files are silenty ignored unless you turn on
include debugging
include.debug
Please let me know how this works for you.
Cheers,
Leif
On Sat, Sep 25, 2021 at 9:57 PM Mark de Groot markdegroot@users.sourceforge.net wrote:
Related
Support Requests: #307