Update ripping-cluster init script to run as media, included with ebuild

This commit is contained in:
2011-06-22 00:50:07 +01:00
parent ee9fae313b
commit 4c9de24d89
4 changed files with 54 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need localmount net
use dns logger puppetmaster netmount nfsmount
}
start() {
ebegin "Starting ripping-cluster-worker"
start-stop-daemon --start --quiet \
--background --make-pidfile --pidfile ${PID_FILE} \
--chuid ${USER} --user ${USER} \
--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}
}