aboutsummaryrefslogtreecommitdiffstats
path: root/testing/beanstalkd/beanstalkd.initd
blob: 475f1025680d57e71f9fd9c5867b7a4bd8035d5d (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
#!/sbin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of MIT
# $Header: /var/cvsroot/gentoo-x86/app-misc/beanstalkd/files/init-1.9,v 1.1 2014/03/31 06:34:28 patrick Exp $

depend() {
	need net
}

start() {
	ebegin "Starting beanstalkd"
	/sbin/start-stop-daemon --start \
        --background \
		--pidfile ${PIDFILE} --make-pidfile \
		--exec ${BEANSTALKD_BINARY} \
		-- -b ${DATADIR} -p ${PORT} -l ${ADDR} -u ${USER} -z ${JOB_SIZE}
	eend $?
}

stop() {
	ebegin "Stopping beanstalkd"
	start-stop-daemon --stop --quiet \
		--pidfile ${PIDFILE} \
		--exec ${BEANSTALKD_BINARY}
	eend $?
}