e17c3f27c0
- Make compatible with the new aolserver 4.5 port infrastructure. - Take maintainership. PR: ports/108737 Submitted by: Martin Matuska <martin@matuska.org> Approved by: "Aldert nooitgedagt - net" <aldert@nooitgedagt.net> (maintainer)
46 lines
999 B
Bash
46 lines
999 B
Bash
#! /bin/sh
|
|
#
|
|
#
|
|
# PROVIDE: openacs
|
|
# REQUIRE: DAEMON NETWORKING SERVERS
|
|
#
|
|
# Add the following line to /etc/rc.conf to enable openacs:
|
|
#
|
|
# openacs_enable="YES"
|
|
#
|
|
# Tweakable parameters for users to override in rc.conf
|
|
|
|
. "%%RC_SUBR%%"
|
|
|
|
name=openacs
|
|
|
|
load_rc_config ${name}
|
|
: ${openacs_enable="NO"}
|
|
: ${openacs_user="%%OPENACS_USER%%"}
|
|
: ${openacs_group="%%OPENACS_GROUP%%"}
|
|
: ${openacs_conf=%%OPENACSBASE%%/etc/openacs-config.tcl}
|
|
: ${openacs_flags="-u ${openacs_user} -g ${openacs_group}"}
|
|
: ${openacs_prog=%%AOLSERVERBASE%%/bin/nsd}
|
|
: ${openacs_pidfile=/var/run/openacs.pid}
|
|
|
|
rcvar=`set_rcvar`
|
|
pidfile=${openacs_pidfile}
|
|
start_postcmd="start_postcmd"
|
|
stop_postcmd="stop_postcmd"
|
|
required_files=${openacs_conf}
|
|
command=%%AOLSERVERBASE%%/bin/nsd
|
|
command_args="-t ${openacs_conf}"
|
|
procname=${openacs_prog}
|
|
|
|
start_postcmd()
|
|
{
|
|
PID=`pgrep -U ${openacs_user} -f ${openacs_conf}`
|
|
[ -n "${PID}" ] && echo ${PID} > ${pidfile}
|
|
}
|
|
|
|
stop_postcmd()
|
|
{
|
|
[ -f "${pidfile}" ] && rm ${pidfile}
|
|
}
|
|
|
|
run_rc_command "$1"
|