mirror of
https://git.freebsd.org/ports.git
synced 2025-06-21 04:30:37 -04:00
45 lines
824 B
Bash
45 lines
824 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: jabberd
|
|
# REQUIRE: %%REQUIRE%%
|
|
# KEYWORD: shutdown
|
|
|
|
|
|
# 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%%"}
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="jabberd"
|
|
rcvar=jabberd_enable
|
|
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 router s2s sm; do
|
|
rm -f ${jabberd_chdir}/$file.pid
|
|
done
|
|
}
|
|
|
|
case "$1" in
|
|
forcestop)
|
|
echo "Stopping jabberd."
|
|
killall -u ${jabberd_user} c2s router s2s sm
|
|
jabberd_post_stopcmd
|
|
;;
|
|
*)
|
|
run_rc_command "$1"
|
|
;;
|
|
esac
|