aboutsummaryrefslogtreecommitdiffstats
path: root/net-im
diff options
context:
space:
mode:
authordemon <demon@FreeBSD.org>2004-01-01 21:19:25 +0800
committerdemon <demon@FreeBSD.org>2004-01-01 21:19:25 +0800
commita271ffd367a14acb5a928fee5caeb6f5cc910fd3 (patch)
tree91ed68fc8bd687cd85093f6dece8878b3ab97cd7 /net-im
parent6a87c2d2d3d432b99a276f7d0c3569cfe330c4f0 (diff)
downloadfreebsd-ports-gnome-a271ffd367a14acb5a928fee5caeb6f5cc910fd3.tar.gz
freebsd-ports-gnome-a271ffd367a14acb5a928fee5caeb6f5cc910fd3.tar.zst
freebsd-ports-gnome-a271ffd367a14acb5a928fee5caeb6f5cc910fd3.zip
Eliminate the evidence that I stole this file from net/jabber port.
Update to reflect the actual names of spawned processes and .pid-files location.
Diffstat (limited to 'net-im')
-rw-r--r--net-im/jabberd/files/jabberd.sh24
1 files changed, 17 insertions, 7 deletions
diff --git a/net-im/jabberd/files/jabberd.sh b/net-im/jabberd/files/jabberd.sh
index 26cdf2e7e5b4..c7dee3844214 100644
--- a/net-im/jabberd/files/jabberd.sh
+++ b/net-im/jabberd/files/jabberd.sh
@@ -6,7 +6,7 @@ if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/jabberd\.sh\$"); then
fi
USER="jabber"
-RUNDIR="/var/tmp"
+RUNDIR="/var/jabberd/pid"
HOSTNAME=`/bin/hostname`
test -x ${PREFIX}/bin/jabberd || exit 1
@@ -14,14 +14,24 @@ test -x ${PREFIX}/bin/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
+case "$1" in
start)
- su -f -m ${USER} -c "jabberd" ;;
-
+ su -f -m ${USER} -c ${PREFIX}/bin/jabberd &
+ echo -n ' jabberd'
+ ;;
stop)
- killall -SIGKILL -u ${USER} jabberd;
- rm -f ${RUNDIR}/jabber.pid;
+ killall -u ${USER} jabberd c2s resolver router s2s sm
+ for file in c2s resolver router s2s sm
+ do
+ rm -f ${RUNDIR}/$file.pid
+ done
+ echo -n ' jabberd'
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
esac
+
+exit 0