summaryrefslogtreecommitdiff
blob: 65b3ced8637480485b02d9ee918312b6e23d4d0f (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
}

start() {
	[ -e "${DRQUEUESLAVE_PIDFILE}" ] && rm -f ${DRQUEUESLAVE_PIDFILE} &>/dev/null

	ebegin "Starting drqsd"
	chown drqueue `dirname ${DRQUEUESLAVE_PIDFILE}` &>/dev/null
	${ENV} /sbin/start-stop-daemon -b --start --quiet --startas /usr/bin/slave \
		--pidfile ${DRQUEUESLAVE_PIDFILE} --make-pidfile
        
	eend $?
}

stop() {
	ebegin "Stopping drqsd"
	pkill -u root,drqueue slave
	start-stop-daemon --stop --quiet --pidfile "${DRQUEUESLAVE_PIDFILE}"
	rm -f "${DRQUEUESLAVE_PIDFILE}"
	eend $?
}