summaryrefslogtreecommitdiff
path: root/app-misc/beanstalkd/files/init
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/beanstalkd/files/init')
-rw-r--r--app-misc/beanstalkd/files/init25
1 files changed, 25 insertions, 0 deletions
diff --git a/app-misc/beanstalkd/files/init b/app-misc/beanstalkd/files/init
new file mode 100644
index 00000000000..7d2e7e909df
--- /dev/null
+++ b/app-misc/beanstalkd/files/init
@@ -0,0 +1,25 @@
+#!/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 \
+ --pidfile ${PIDFILE} \
+ --exec ${BEANSTALKD_BINARY} \
+ -- -d -p ${PORT} -l ${ADDR} -u ${USER}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping beanstalkd"
+ start-stop-daemon --stop --quiet \
+ --pidfile ${PIDFILE} \
+ --exec ${BEANSTALKD_BINARY}
+ eend $?
+}