summaryrefslogtreecommitdiff
blob: 143b9f4c7b3199a1cd7bf8690a95155c0c6ce6da (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
#!/sbin/runscript

depend() {
	need net
	use jabber-server
}

start() {
	ebegin "Starting MSN Jabber Transport"
	if [ -f ${PIDFILE} ]; then
                if [ -z $(ps ax | grep `cat ${PIDFILE}` | grep -v grep ) ]
                then
                        rm -f ${PIDFILE}
                fi
        fi

	/usr/sbin/jabberd -B -c ${CONFIG} -H /var/spool/jabber >/dev/null 2>&1
	eend $?
}

stop() {
	ebegin "Stopping MSN Jabber Transport"
        if [ -f ${PIDFILE} ]; then
                kill `cat ${PIDFILE}`
        fi
        sleep 2
        if [ -f ${PIDFILE} ]; then
                kill -9 `cat ${PIDFILE}`
                rm -f ${PIDFILE}
        fi
        rm -f ${PIDFILE}
	eend $?
}