summaryrefslogtreecommitdiff
blob: 504aada7f7cbf90336bd74c45c3dce86a1ddd1bd (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/openrc-run

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 $?
}