summaryrefslogtreecommitdiff
blob: da2e281c52b48bac9471c74b4493cbdd8762609b (plain)
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
28
29
30
31
32
33
34
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabber.rc6-r8,v 1.1 2005/05/21 18:35:51 humpback Exp $

depend() {
	need net
	provide jabber-server
}

start() {
	ebegin "Starting Jabber Server"
	if [ -f ${JPIDFILE} ]; then
		if [ -z $(ps ax | grep `cat ${JPIDFILE}` | grep -v grep ) ]
		then
			rm -f ${JPIDFILE}
		fi
	fi
	start-stop-daemon --start  -c jabber:jabber \
		-x /usr/sbin/jabberd -- -B -c /etc/jabber/multiple.xml 
	eend $?
}

stop() {
	ebegin "Stopping Jabber Server"
	start-stop-daemon --stop  -x /usr/sbin/jabberd
	kill `cat ${JPIDFILE}`
	sleep 2
	if [ -f ${JPIDFILE} ]; then
		kill -9 `cat ${JPIDFILE}`
		rm -f ${JPIDFILE}
	fi												 
	eend $?
}