videopdf/etc/init/pdfvideo.conf

25 lines
613 B
Text
Raw Normal View History

2013-02-12 07:49:16 +00:00
# pdfview gunicorn daemon
#
description "pdfview daemon"
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 5
respawn
env NAME=pdfview
env VENV=/srv/pdfview
env DAEMON_USER=pdfview
env HOME=/home/pdfview
script
test -e /var/log/$NAME || (mkdir -p /var/log/pdfview && chown $DAEMON_USER:$DAEMON_USER /var/log/$NAME)
cd $VENV/pdfview
exec /usr/bin/sudo -u $DAEMON_USER $VENV/bin/gunicorn_django \
--bind 127.0.0.1:2688 \
--timeout 90 \
--log-level info --log-file /var/log/$NAME/$NAME.log \
--workers 5
end script