diff options
author | abs <abs@pkgsrc.org> | 2004-06-26 14:28:09 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2004-06-26 14:28:09 +0000 |
commit | f821265a081787836a818dbd9731db9a274a3211 (patch) | |
tree | 54486086b2eb998adaf2cd6abd3fbf1ba4bc3eab /chat/mu-conference/files | |
parent | d960c801532485f140aa0cc0467ded539a910b1d (diff) | |
download | pkgsrc-f821265a081787836a818dbd9731db9a274a3211.tar.gz |
Import chat/mu-conference-0.6.0
mu-conference is an implementation of the Multi-User Chat protocol,
as defined in JEP-0045, intended for use against jabberd2 (tested)
or jabberd.
Diffstat (limited to 'chat/mu-conference/files')
-rw-r--r-- | chat/mu-conference/files/muc.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/chat/mu-conference/files/muc.sh b/chat/mu-conference/files/muc.sh new file mode 100644 index 00000000000..3c3d9f28b30 --- /dev/null +++ b/chat/mu-conference/files/muc.sh @@ -0,0 +1,41 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: muc.sh,v 1.1.1.1 2004/06/26 14:28:09 abs Exp $ +# +# PROVIDE: muc +# REQUIRE: DAEMON + +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +name="muc" +rcvar=$name +command="@PREFIX@/bin/mu-conference" +required_files="@PKG_SYSCONFDIR@/${name}-jcr.xml" +extra_commands="reload" +command_args="-c ${required_files} 2>&1 > /dev/null &" +pidfile="@JABBERD_PIDDIR@/${name}.pid" +stop_postcmd="remove_pidfile" +start_precmd="ensure_piddir" + +ensure_piddir() +{ + mkdir -p @JABBERD_PIDDIR@ + chown @JABBERD_USER@ @JABBERD_PIDDIR@ +} + +remove_pidfile() +{ + if [ -f @JABBERD_PIDDIR@/${name}.pid ]; then + rm -f @JABBERD_PIDDIR@/${name}.pid + fi +} + +if [ -f /etc/rc.subr ]; then + load_rc_config $name + run_rc_command "$1" +else + @ECHO@ -n " ${name}" + ${command} ${muc_flags} ${command_args} +fi |