Okay, so mine isn't as cool as the last attached one, but this one works
for me on Red Hat 7.1... (just thought I'd share)
--
Joachim Schaaf wrote:
> Am Freitag, 5. Oktober 2001 11:24 schrieben Sie:
>
>>Can anyone refer me to an FAQ or even advise me directly how to set up
>>JBoss to start as a daemon one Mandrake 7.2 ?
>>
>
> I don't know Mandrake, but on SuSE you could start with /etc/rc.d/skeleton ;)
>
> Take the attached script and check the program name (serverprog) and TCP
> port, then call it from your preferred runlevel.
>
> Joachim
>
#!/bin/sh
# JBoss start/stop script
JAVA_HOME=/usr/java/jdk1.3.1
JBOSS_HOME=/usr/local/jboss
JBOSS_USER=david
JBOSS_HOST=localhost
JBOSS_PORT=8082
JBOSS_LOG=/tmp/jboss.log
SU=/bin/su
NOHUP=/usr/bin/nohup
ECHO=/bin/echo
case "$1" in
start)
$SU -c "cd $JBOSS_HOME/bin ; $NOHUP ./run_with_catalina.sh 1>
$JBOSS_LOG 2>&1 &" - $JBOSS_USER
;;
stop)
$JAVA_HOME/bin/java -cp $JBOSS_HOME/lib/ext/jboss.jar
org.jboss.Shutdown $JBOSS_HOST $JBOSS_PORT
;;
*)
$ECHO "Usage: $0 {start|stop}"
exit 1
esac