I couldn't find any Linux startup scripts for jBoss, so I wrote the following.
Hope they're useful to others.
Just create the following 2 scripts (the location is indicated before each
file, assuming you installed jBoss in /usr/local/jboss), then run the command
'chkconfig jboss on' to create the startup links.
###################################
# /usr/local/jboss/bin/jbossrun
#
# This script just runs jBoss
# and stores PID.
###################################
#!/bin/sh
JBOSS_HOME=/usr/local/jboss
JAVA_HOME=/usr/java/jdk1.3
# Set classpath
CLASSPATH=$CLASSPATH:$JBOSS_HOME/bin/run.jar:$JBOSS_HOME/lib/jdbc2_0-stdext.ja
r:$JBOSS_HOME/lib/jboss-jaas.jar
## Start jBoss
cd $JBOSS_HOME/bin
$JAVA_HOME/bin/java -server -classpath $CLASSPATH org.jboss.Main $@ >
/dev/null &
## Find PID for startup scripts
echo $! > /var/run/jbossrun.pid
#####################################
# /etc/rc.d/init.d/jboss
#
# Script runs the last file
# using usual Red Hat startup
# functions.
#####################################
#!/bin/sh
#
# Startup script for jBoss
#
# chkconfig: 345 96 10
# description: jBoss EJB container
# processname: jbossrun
# pidfile: /var/run/jbossrun.pid
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
echo -n "Starting jBoss: "
daemon /usr/local/jboss/bin/jbossrun
echo
touch /var/lock/subsys/jbossrun
;;
stop)
echo -n "Shutting down jboss: "
killproc jbossrun
echo
rm -f /var/lock/subsys/jbossrun
rm -f /var/run/jbossrun.pid
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
Sami Shaaban
NuRelm Internet Solutions
http://www.nurelm.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]