ports/net-im/mu-conference/files/mu-conference.in
Doug Barton 83eb2c3700 In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().

In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
2012-01-14 08:57:23 +00:00

45 lines
1,000 B
Bash

#!/bin/sh
#
# $FreeBSD$
# PROVIDE: mu_conference
# REQUIRE: %%JABBER_REQUIRE%%
# KEYWORD: shutdown
# Define these mu_conference_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
# mu_conference_config : path
# Path to the configuration file ("%%PREFIX%%/etc/muc.xml", the default).
#
# mu_conference_enable : bool
# Enable ("YES") or disable ("NO", the default) this startup script.
#
. /etc/rc.subr
name="mu_conference"
rcvar=mu_conference_enable
command="%%PREFIX%%/bin/mu-conference"
stop_postcmd="mu_conference_stop_post"
mu_conference_stop_post () {
rm -f ${pidfile}
}
load_rc_config $name
: ${mu_conference_config="%%PREFIX%%/etc/muc.xml"}
: ${mu_conference_enable="NO"}
: ${mu_conference_user="%%JABBER_USER%%"}
: ${mu_conference_pidfile="%%JABBER_PIDDIR%%/mu-conference.pid"}
pidfile=${mu_conference_pidfile}
command_args="-c ${mu_conference_config} -B >/dev/null 2>&1"
run_rc_command "$1"