openbsd-ports/www/tomcat/v6/pkg/tomcat.rc
dcoppa e4b8b0caab Add rc scripts for tomcat v5 and v6, and remove some stuff rendered
obsolete by the rc scripts.

While here, reword README files as suggested by ian@ and sthen@.

ok ian@, sthen@, jasper@
2011-07-24 11:11:58 +00:00

30 lines
710 B
Bash
Executable File

#!/bin/sh
#
# $OpenBSD: tomcat.rc,v 1.1 2011/07/24 11:11:59 dcoppa Exp $
daemon="${TRUEPREFIX}/tomcat/bin/catalina.sh"
daemon_flags="-server"
daemon_user="_tomcat"
. /etc/rc.d/rc.subr
pexp="$(${LOCALBASE}/bin/javaPathHelper -h tomcat).*-Dcatalina.base=${CATALINA_BASE}.*org.apache.catalina.startup.Bootstrap.*"
rc_reload=NO
rc_start() {
${rcexec} \
"CATALINA_BASE=\"${CATALINA_BASE}\" \
CATALINA_OPTS=\"${daemon_flags}\" \
JAVA_HOME=\"$(${LOCALBASE}/bin/javaPathHelper -h tomcat)\" ${daemon} start"
}
rc_stop() {
CATALINA_BASE="${CATALINA_BASE}" \
CATALINA_OPTS="${daemon_flags}" \
JAVA_HOME="$(${LOCALBASE}/bin/javaPathHelper -h tomcat)" \
${daemon} stop
}
rc_cmd $1