On Thu, 08 Feb 2001, you wrote:
> Greetings,
[snip]
> Toby suggested using $! to capture the PID of the Java process launched in the
> background. While I dont think this will work in the init.d/jboss script it will
> work by adding it to $JBOSS_HOME/bin/run.sh , if that script is run in the
> background.
And if you run the java command in the background... otherwise you won't get
the PID until the process finishes, when it won't be much use to you.
> Tom pointed out that jboss does its own logging and thus it is redundant to
create > an additional log file. However, I believe it is best , when launching
jboss as an > init daemon, to run it in the background. This avoids potential
hang problems at > boot time, I think, since daemon wont get a return signal
from run.sh if it starts > it in the foreground.
I still thing it's bad to have two files logging the same thing. If you want
to start it in the background, redirect to /dev/null; it's what it's there for.
> Finally I propose that run.sh do a test for the type of JDK, since it seems
that > SUN jdk1.3's java recognizes the "-server" switch, but IBM's does not.
Agreed. Compaq's JDK also does not support this switch.
[snip]
> elif [ "$1" = "stop" ] ; then
> shift
> kill -9 $(cat /var/run/jboss.pid)
I agree with Toby on this, it is not portable... in fact I can't find a shell
in which it works. This syntax is for environment variables, what you are
looking for is
kill -9 `cat /var/run/jboss.pid`
note that backwards single quotes.
Other than that, it's looking very handy indeed.
Tom
[snip]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]