openbsd-ports/net/aircontrol/pkg/aircontrol.rc
sthen 058208a52b - update airControl to 1.3.6-beta
- add an rc script, which looks good to ajacoutot@ (and might have
parts people can borrow if they want to write an rc script for other
Java daemons)
2011-03-03 13:20:43 +00:00

30 lines
624 B
Bash

#!/bin/sh
#
# $OpenBSD: aircontrol.rc,v 1.1 2011/03/03 13:20:43 sthen Exp $
daemon="${TRUEPREFIX}/bin/catalina.sh"
daemon_flags="-Xmx768M -server"
daemon_user="_aircontrol"
. /etc/rc.d/rc.subr
pexp="$(javaPathHelper -h aircontrol).*-Dcatalina.base=/var/aircontrol"
rc_reload=NO
rc_start() {
${rcexec} \
"CATALINA_OPTS=\"${daemon_flags}\" \
JAVA_HOME=\"$(javaPathHelper -h aircontrol)\" \
${daemon} start" >/dev/null
}
rc_stop() {
${rcexec} \
"CATALINA_OPTS=\"${daemon_flags}\" \
JAVA_HOME=\"$(javaPathHelper -h aircontrol)\" \
${daemon} stop" >/dev/null 2>&1
}
rc_cmd $1