1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-30 21:49:25 +00:00
freebsd-ports/net/jabber/files/jabberd.sh
Josef Karthauser 59b10374be Port of the Jabber instant messaging server, version 1.4.
This replaces net/jabber-transport, and was repo-copied from there.
2001-02-12 19:44:39 +00:00

27 lines
508 B
Bash

#! /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=/tmp
out=/var/log/jabber.log
hostname=`/bin/hostname`
export PATH=/bin:/usr/bin:${PREFIX}/bin
umask 077
test -x ${PREFIX}/bin/jabberd || exit 1
echo -n " jabberd"
cd ${rundir} || exit
arg=${1:-start}
case $arg in
start)
su -f -m ${user} -c "jabberd -h ${hostname} -c ${PREFIX}/etc/jabber.xml" >${out} 2>&1 &;;
stop)
killall jabberd;;
esac