#!/bin/sh
#
# $FreeBSD: ports/net-im/mu-conference/files/mu-conference.in,v 1.1 2007/07/26 11:31:26 mm Exp $

# PROVIDE: mu_conference
# REQUIRE: DAEMON
# 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 ("/usr/local/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=`set_rcvar`

command="/usr/local/bin/mu-conference"
pidfile=${mu_conference_pidfile:-"/var/run/mu-conference/mu-conference.pid"}

stop_postcmd="mu_conference_stop_post"

mu_conference_stop_post () {
        rm -f ${pidfile}
}

load_rc_config $name

: ${mu_conference_config="/usr/local/etc/muc.xml"}
: ${mu_conference_enable="NO"}
: ${mu_conference_user="nobody"}

command_args="-c ${mu_conference_config} -B >/dev/null 2>&1"

run_rc_command "$1"
