diff options
author | Martin Matuska <mm@FreeBSD.org> | 2007-07-26 20:00:52 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2007-07-26 20:00:52 +0000 |
commit | e072e388330f61ed75e238b6b37162203923a19a (patch) | |
tree | 3c70dfc3f3a66ba0e10a79c115d605f00305a864 /net-im/jabberd/files/jabberd.in | |
parent | 17b66e2933057898e2692ad8fc4ee9c6d2c79268 (diff) | |
download | ports-e072e388330f61ed75e238b6b37162203923a19a.tar.gz ports-e072e388330f61ed75e238b6b37162203923a19a.zip |
Notes
Diffstat (limited to 'net-im/jabberd/files/jabberd.in')
-rw-r--r-- | net-im/jabberd/files/jabberd.in | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/net-im/jabberd/files/jabberd.in b/net-im/jabberd/files/jabberd.in new file mode 100644 index 000000000000..258d5a88adac --- /dev/null +++ b/net-im/jabberd/files/jabberd.in @@ -0,0 +1,45 @@ +#!/bin/sh + +# $FreeBSD$ + +# PROVIDE: jabberd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown +# +prefix=%%PREFIX%% + +# Define these jabberd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +jabberd_chdir=${jabberd_chdir-"%%JABBER_RUNDIR%%/pid"} +jabberd_enable=${jabberd_enable-"NO"} +jabberd_user=${jabberd_user-"%%JABBER_USER%%"} + +. %%RC_SUBR%% + +name="jabberd" +rcvar=`set_rcvar` +command="${prefix}/bin/jabberd" +command_args="&" +procname="${prefix}/bin/router" + +load_rc_config $name + +pidfile="${jabberd_chdir}/router.pid" + +case "$1" in + stop|faststop|onestop) + echo "Stopping Jabber2" + killall -u ${jabberd_user} jabberd c2s resolver router s2s sm + for file in c2s resolver router s2s sm; do + rm -f ${jabberd_chdir}/$file.pid + done + ;; + *) + run_rc_command "$1" + ;; +esac |