videopdf/etc/init/videopdf.conf

25 lines
621 B
Text
Raw Normal View History

2013-02-12 16:16:25 +05:30
# videopdf gunicorn daemon
2013-02-12 13:19:16 +05:30
#
2013-02-12 16:16:25 +05:30
description "videopdf daemon"
2013-02-12 13:19:16 +05:30
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 5
respawn
2013-02-12 16:16:25 +05:30
env NAME=videopdf
env VENV=/srv/videopdf
env DAEMON_USER=videopdf
env HOME=/home/videopdf
2013-02-12 13:19:16 +05:30
script
2013-02-12 16:16:25 +05:30
test -e /var/log/$NAME || (mkdir -p /var/log/videopdf && chown $DAEMON_USER:$DAEMON_USER /var/log/$NAME)
cd $VENV/videopdf
2013-02-12 13:19:16 +05:30
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