On Thu, 30 Jun 2011, Stuart Henderson wrote:

> On 2011/06/30 17:16, David Coppa wrote:
> >  The packages are structured this way to facilate mantaining a server
> 
> s/man/main/
> 
> rest reads ok
> 

Loosely based on aircontrol's rc script. It works well in my tests.

Since I'm at it, I think aircontrol's rc script is broken as it is
now, because of wrongly escaped quotation marks in the rc_stop
function. A pasto from rc_start() ??

Stuart, can you have a look at it?

--- cut here ---

#!/bin/sh
#
# $OpenBSD$

daemon="${TRUEPREFIX}/tomcat/bin/catalina.sh"
daemon_flags="-Xmx768M -server"
daemon_user="_tomcat"

. /etc/rc.d/rc.subr

pexp="$(${LOCALBASE}/bin/javaPathHelper -h 
tomcat).*-Dcatalina.base=/var/tomcat.*org.apache.catalina.startup.Bootstrap.*"

rc_reload=NO

rc_start() {
        ${rcexec} \
            "CATALINA_OPTS=\"${daemon_flags}\" \
            JAVA_HOME=\"$(${LOCALBASE}/bin/javaPathHelper -h tomcat)\" 
${daemon} start"
}

rc_stop() {
        CATALINA_OPTS="${daemon_flags}" \
            JAVA_HOME="$(${LOCALBASE}/bin/javaPathHelper -h tomcat)" \
            ${daemon} stop
}

rc_cmd $1

--- cut here ---

ciao,
David

Reply via email to