e32e907757
Tested by shadchin@ Tested & OK ian@
30 lines
714 B
Bash
Executable File
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
|