forked from 0x2620/pandora
29 lines
770 B
Text
29 lines
770 B
Text
# pandora encoding daemon
|
|
#
|
|
|
|
description "pandora encoding daemon"
|
|
|
|
start on runlevel [2345]
|
|
stop on runlevel [!2345]
|
|
|
|
respawn
|
|
|
|
env VENV=/srv/pandora
|
|
env USER=pandora
|
|
env HOME=/home/pandora
|
|
|
|
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-encoding.pid \
|
|
--exec $VENV/bin/python -- \
|
|
$VENV/pandora/manage.py celeryd \
|
|
-Q encoding \
|
|
-n pandora-encoding \
|
|
--pidfile /var/run/pandora/pandora-encoding.pid \
|
|
-f /var/log/pandora/pandora-encoding.log \
|
|
-l INFO
|