mirror of
https://git.freebsd.org/ports.git
synced 2025-07-16 00:39:15 -04:00
literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
47 lines
837 B
Bash
47 lines
837 B
Bash
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
|
|
# 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
|