oxbrowser/etc/init/oxbrowser.conf
2011-09-04 13:25:14 +02:00

20 lines
779 B
Text

# oxbrowser gunicorn daemon
#
description "oxbrowser daemon"
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 5
respawn
env VENV=/srv/oxbrowser
env USER=oxbrowser
env HOME=/home/oxbrowser
script
test -e /var/log/oxbrowser || (mkdir -p /var/log/oxbrowser && chown $USER:$USER /var/log/oxbrowser)
test -e /var/run/oxbrowser || (mkdir -p /var/run/oxbrowser && chown $USER:$USER /var/run/oxbrowser)
cd $VENV/oxbrowser
exec /usr/bin/sudo -u $USER $VENV/bin/gunicorn_django --bind unix:/var/run/oxbrowser/gunicorn.sock --timeout 90 --log-level info --log-file /var/log/oxbrowser/oxbrowser.log --workers 5 $VENV/oxbrowser/settings.py
end script