1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-04 22:33:27 +00:00
freebsd-ports/net-im/jabber/files/jabberd.sh
Neil Blakey-Milner 8b5c744c32 Upgrade jabber-transport to 1.0
PR:		18602
Submitted by:	Kostya Lukin <lukin@sapa.ivcme.elektra.ru> (maintainer)
2000-05-16 14:18:46 +00:00

28 lines
450 B
Bash

#! /bin/sh
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/jserver\.sh\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
fi
user=jserver
rundir=/tmp
out=${rundir}/jserver.out
export PATH=/bin:/usr/bin:${PREFIX}/bin
umask 077
test -x ${PREFIX}/bin/jserver || exit 1
echo -n " jserver"
cd ${rundir} || exit
arg=${1:-start}
case $arg in
start)
su -f -m ${user} -c \
"jserver" \
>>${out} 2>&1 &;;
stop)
killall jserver;;
esac