summaryrefslogtreecommitdiff
blob: bfbb74f69864017a06ca3f59f0e47f85beac0da0 (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
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

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

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