From cd93f13f41851a030a934d3a49d8c6d1ebc24bb1 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sat, 18 Jun 2011 18:30:03 +0100 Subject: [PATCH] Add gentoo init script --- build/ripping-cluster-worker.init-gentoo | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 build/ripping-cluster-worker.init-gentoo diff --git a/build/ripping-cluster-worker.init-gentoo b/build/ripping-cluster-worker.init-gentoo new file mode 100644 index 0000000..27f5d00 --- /dev/null +++ b/build/ripping-cluster-worker.init-gentoo @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PID_FILE="/var/run/ripping-cluster-worker.pid" + +depend() { + need localmount net + use dns logger puppetmaster netmount nfsmount +} + +start() { + ebegin "Starting ripping-cluster-worker" + start-stop-daemon --start --quiet \ + --pidfile ${PID_FILE} \ + --exec /usr/bin/php /usr/lib/ripping-cluster/worker/ripping-cluster-worker.php + eend $? "Failed to start ripping-cluster-worker" +} + +stop() { + ebegin "Stopping ripping-cluster-worker" + start-stop-daemon --stop --quiet \ + --pidfile ${PID_FILE} + local ret=$? + eend ${ret} "Failed to stop puppet" + rm -f ${PID_FILE} + return ${ret} +} +