blob: 6e556b00855597baebc8c3c3f0bec4adce5db570 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd/files/jabber.rc6-r7,v 1.6 2004/07/08 01:29:16 humpback Exp $
depend() {
need net
provide jabber-server
}
start() {
ebegin "Starting main Jabber Component"
if [ "${JABBERD}" = "jabberd14" ]
then
if [ -f ${JPIDFILE} ]; then
if [ -z $(ps ax | grep `cat ${JPIDFILE}` | grep -v grep ) ]
then
rm -f ${JPIDFILE}
fi
fi
jabberd -B -c /etc/jabber/multiple.xml >/dev/null 2>&1
else
ebegin " Router"
start-stop-daemon --start -b -q -x /usr/bin/router
eend $?
ebegin " Resolver"
start-stop-daemon --start -b -q -x /usr/bin/resolver
eend $?
ebegin " Session Manager"
start-stop-daemon --start -b -q -x /usr/bin/sm
eend $?
ebegin " Client to Server Component"
start-stop-daemon --start -b -q -x /usr/bin/c2s
eend $?
ebegin " Server to Server Component"
start-stop-daemon --start -b -q -x /usr/bin/s2s
eend $?
fi
eend $?
}
stop() {
ebegin "Stopping main Jabber Component"
if [ "${JABBERD}" = "jabberd14" ]
then
kill `cat ${JPIDFILE}`
sleep 2
if [ -f ${JPIDFILE} ]; then
kill -9 `cat ${JPIDFILE}`
rm -f ${JPIDFILE}
fi
else
ebegin " Router"
start-stop-daemon --stop -q --pidfile /var/jabberd/pid/router.pid
eend $?
ebegin " Resolver"
start-stop-daemon --stop -q --pidfile /var/jabberd/pid/resolver.pid
eend $?
ebegin " Session Manager"
start-stop-daemon --stop -q --pidfile /var/jabberd/pid/sm.pid
eend $?
ebegin " Client to Server Component"
start-stop-daemon --stop -q --pidfile /var/jabberd/pid/c2s.pid
eend $?
ebegin " Server to Server Component"
start-stop-daemon --stop -q --pidfile /var/jabberd/pid/s2s.pid
eend $?
fi
eend $?
}
|