2010-06-25 11:53:57 +00:00
|
|
|
# pandora background tasks daemon
|
2010-04-29 11:29:13 +00:00
|
|
|
#
|
|
|
|
|
2010-06-25 11:53:57 +00:00
|
|
|
description "pandora background tasks daemon"
|
2010-04-29 11:29:13 +00:00
|
|
|
|
|
|
|
start on runlevel [2345]
|
|
|
|
stop on runlevel [!2345]
|
|
|
|
|
|
|
|
respawn
|
|
|
|
|
2010-11-30 21:41:58 +00:00
|
|
|
env VENV=/srv/pandora
|
|
|
|
env USER=pandora
|
2010-12-01 20:34:38 +00:00
|
|
|
env HOME=/home/pandora
|
2010-04-29 11:29:13 +00:00
|
|
|
|
2010-11-30 21:41:58 +00:00
|
|
|
script
|
|
|
|
test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $USER:$USER /var/log/pandora)
|
2011-10-19 14:27:38 +00:00
|
|
|
test -e /var/run/pandora || (mkdir -p /var/run/pandora && chown $USER:$USER /var/run/pandora)
|
2010-11-30 21:41:58 +00:00
|
|
|
cd $VENV/pandora
|
2011-03-24 10:39:07 +00:00
|
|
|
exec /usr/bin/sudo -u $USER $VENV/bin/python $VENV/pandora/manage.py celeryd \
|
2010-12-25 13:45:19 +00:00
|
|
|
-Q default \
|
|
|
|
-n pandora-default \
|
2012-01-19 05:30:07 +00:00
|
|
|
--pidfile /var/run/pandora/pandora-tasks.pid \
|
2010-12-25 13:45:19 +00:00
|
|
|
-f /var/log/pandora/pandora-tasks.log \
|
|
|
|
-l INFO
|
2010-11-30 21:41:58 +00:00
|
|
|
end script
|