2013-02-21 06:55:49 +00:00
|
|
|
# pandora cron daemon
|
|
|
|
#
|
|
|
|
|
|
|
|
description "pandora cron daemon"
|
|
|
|
|
|
|
|
start on runlevel [2345]
|
|
|
|
stop on runlevel [!2345]
|
|
|
|
|
|
|
|
respawn
|
|
|
|
|
|
|
|
env VENV=/srv/pandora
|
|
|
|
env USER=pandora
|
|
|
|
env HOME=/home/pandora
|
|
|
|
|
2013-08-23 16:47:45 +00:00
|
|
|
pre-start script
|
2013-02-21 06:55:49 +00:00
|
|
|
test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $USER:$USER /var/log/pandora)
|
|
|
|
test -e /var/run/pandora || (mkdir -p /var/run/pandora && chown $USER:$USER /var/run/pandora)
|
|
|
|
end script
|
2013-08-23 16:47:45 +00:00
|
|
|
|
|
|
|
exec start-stop-daemon \
|
|
|
|
--start -c $USER -d $VENV/pandora \
|
|
|
|
-n pandora-cron --exec $VENV/bin/python -- \
|
|
|
|
$VENV/pandora/manage.py celerybeat \
|
|
|
|
-s /var/run/pandora/celerybeat-schedule \
|
|
|
|
--pidfile /var/run/pandora/pandora-cron.pid \
|
|
|
|
-f /var/log/pandora/pandora-cron.log \
|
|
|
|
-l INFO
|