#!/sbin/runscript # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ JBOSS_HOME="__JBOSS_HOME__" JBOSS_START="bin/run.sh" JBOSS_STOP="bin/shutdown.sh" JBOSS_GROUP="jboss" depend() { need net use dns } start() { ebegin "Starting JBoss Application Server __JBOSS_VER__" # make sure Java stuff is set. start-stop-daemon --start --background -g "${JBOSS_GROUP}" \ -u "${JBOSS_USER}" --exec "${JBOSS_HOME}/${JBOSS_START}" \ -- ${JBOSS_OPTIONS} eend ${?} } stop() { ebegin "Stopping JBoss Application Server __JBOSS_VER__" "${JBOSS_HOME}/${JBOSS_STOP}" -S eend ${?} # Sorry, wait for server shutdown sleep "${SHUTDOWN_SECS}" }