blob: d6aa960fb6f65f7fd8fe0a557c89d17f2e8123d6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#! /bin/sh
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/jabberd\.sh\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
fi
USER="jabber"
RUNDIR="/var/tmp"
HOSTNAME=`/bin/hostname`
test -x ${PREFIX}/sbin/jabberd || exit 1
export PATH=/sbin:/bin:/usr/bin:${PREFIX}/bin:${PREFIX}/sbin
umask 077
echo -n " jabberd "
cd ${RUNDIR} || exit
case ${1:-start} in
start)
su -f -m ${USER} -c "jabberd -B -h ${HOSTNAME} -c ${PREFIX}/etc/jabber.xml" ;;
stop)
killall -SIGKILL -u ${USER} jabberd;
rm -f ${RUNDIR}/jabber.pid;
esac
|