33 lines
769 B
Plaintext
33 lines
769 B
Plaintext
#!/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} \
|
|
--user ${USER} \
|
|
--exec /usr/bin/php /usr/lib/ripping-cluster/source/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 ripping-cluster-worker"
|
|
if [[ "${ret}" == 0 ]]; then
|
|
rm -f ${PID_FILE}
|
|
fi
|
|
|
|
return ${ret}
|
|
}
|
|
|