mirror of
https://git.freebsd.org/ports.git
synced 2025-05-20 11:03:09 -04:00
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.
45 lines
1,000 B
Bash
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"
|