openbsd-ports/www/tomcat/v7/pkg/tomcat.rc
dcoppa e32e907757 Import tomcat-7.0.22.
Tested by shadchin@
Tested & OK ian@
2011-10-31 08:23:38 +00:00

30 lines
714 B
Bash
Executable File

#!/bin/sh
#
# $OpenBSD: tomcat.rc,v 1.1.1.1 2011/10/31 08:23:38 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