update init script

This commit is contained in:
j 2011-07-30 13:31:04 +02:00
parent 896af63b5f
commit 7557aab7f8

View file

@ -5,10 +5,20 @@ description "oxdata daemon"
start on runlevel [2345]
stop on runlevel [!2345]
kill timeout 5
respawn
chdir /srv/oxdata/oxdata
exec /srv/oxdata/bin/gunicorn_django --daemon -u oxdata -g oxdata -b 127.0.0.1:8087 -w2 settings.py
env VENV=/srv/oxdata
env USER=oxdata
env HOME=/home/oxdata
script
test -e /var/log/oxdata || (mkdir -p /var/log/oxdata && chown $USER:$USER /var/log/oxdata)
cd $VENV/oxdata
exec /usr/bin/sudo -u $USER $VENV/bin/gunicorn_django \
--bind 127.0.0.1:8087 \
--timeout 90 \
--log-level info --log-file /var/log/oxdata/oxdata.log \
--workers 5 \
$VENV/oxdata/settings.py
end script