pandora/etc/init/pandora-tasks.conf
2014-01-18 12:03:25 +00:00

30 lines
803 B
Text

# pandora background tasks daemon
#
description "pandora background tasks daemon"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
env VENV=/srv/pandora
env USER=pandora
env HOME=/home/pandora
env LANG=en_US.UTF-8
pre-start script
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
exec start-stop-daemon \
--start -c $USER -d $VENV/pandora \
--pidfile /var/run/pandora/pandora-tasks.pid \
--exec $VENV/bin/python -- \
$VENV/pandora/manage.py celeryd \
-Q default,celery \
-n pandora-default \
--pidfile /var/run/pandora/pandora-tasks.pid \
-f /var/log/pandora/pandora-tasks.log \
-l INFO