#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later

depend() {
	need net
}

start() {
	ebegin "Starting JBoss"
	cd $JBOSS_HOME/bin
	if [ -z "$SUBIT" ]; then
		eval $CMD_START >${JBOSS_CONSOLE} 2>&1 &
	else
		$SUBIT "$CMD_START >${JBOSS_CONSOLE} 2>&1 &" 
	fi
	eend $?
}

stop () {
	ebegin "Stopping JBoss"
	if [ -z "$SUBIT" ]; then
		$CMD_STOP
	else
		$SUBIT "$CMD_STOP"
	fi 
	eend $?
}
