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

depend() {
	need net
	use jabber-server
}

start() {
	ebegin "Starting Yahoo Jabber Transport"
	start-stop-daemon --start --pidfile /var/run/yahoo-transport.pid \
	--make-pidfile --background --startas /usr/sbin/jabberd \
	-- -B -c /etc/jabber/yahootrans.xml -H /var/spool/jabber
	eend $?
}

stop() {
	ebegin "Stoping Yahoo Jabber Transport"
	#Yahoo transport does not creat a pid file
	#And after starting it forks so the pid generated by start-stop-daemon is
	#no good
	#So we use this very ugly hack
	PIDFILE=`ps aux |grep jabberd |grep yahoo|cut -c 9-15`
	kill ${PIDFILE}
	eend $?
}