You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Martin Heiden <ma...@devk.de> on 2005/06/27 10:02:20 UTC
Re[2]: How to shutdown Lenya from CLI?
Solprovider,
> I need:
> 1. A command to start Lenya that returns.
> lenya.sh starts Lenya, but never returns. That would stall the boot
> process if I call it in init.d. I need to research how Java can start
> and return.
Did you try jsvc? (http://jakarta.apache.org/commons/daemon/jsvc.html)
It is used by tomcat to run it as a unix daemon. IMHO you can use it
with jetty too.
Martin.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org
Re: Re[2]: How to shutdown Lenya from CLI?
Posted by so...@gmail.com.
Just an update. Still working.
On 6/27/05, Martin Heiden <ma...@devk.de> wrote:
> > I need:
> > 1. A command to start Lenya that returns.
> > lenya.sh starts Lenya, but never returns. That would stall the boot
> > process if I call it in init.d. I need to research how Java can start
> > and return.
> Did you try jsvc? (http://jakarta.apache.org/commons/daemon/jsvc.html)
> It is used by tomcat to run it as a unix daemon. IMHO you can use it
> with jetty too.
I tried this approach first. jsvc requires a class implements Daemon
with an init(), start(), stop(), and destroy(). I started to convert
Loader to LoaderDaemon, then realized the Loader is completely
unsuitable for this. Jetty has a Service class with createAll(),
startAll(), stopAll(), destroyAll(), and main(). That should be
easier to convert to implements Daemon.
That looks like a good solution, but it would require Lenya to package
jsvc. I may return to it later.
Now I am trying Wolfgang's approach. To answer his issue, liberal use
of $LENYA_HOME conquers the directory problems. lenya.sh will fail
from other directories if the test for the build directory is not
$LENYA_HOME/build.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org