#!/bin/sh # $FreeBSD$ # PROVIDE: jabberd # REQUIRE: %%REQUIRE%% # 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_interpreter="%%PERL%%" command="${prefix}/bin/jabberd" command_args="-b" stop_postcmd=jabberd_post_stopcmd load_rc_config $name jabberd_post_stopcmd() { for file in c2s resolver router s2s sm; do rm -f ${jabberd_chdir}/$file.pid done } case "$1" in forcestop) echo "Stopping jabberd." killall -u ${jabberd_user} c2s resolver router s2s sm jabberd_post_stopcmd ;; *) run_rc_command "$1" ;; esac