update init script
This commit is contained in:
parent
8b5c0ed193
commit
71c59e3217
1 changed files with 13 additions and 8 deletions
|
@ -12,13 +12,18 @@ env VENV=/srv/oxdata
|
||||||
env USER=oxdata
|
env USER=oxdata
|
||||||
env HOME=/home/oxdata
|
env HOME=/home/oxdata
|
||||||
|
|
||||||
script
|
pre-start script
|
||||||
test -e /var/log/oxdata || (mkdir -p /var/log/oxdata && chown $USER:$USER /var/log/oxdata)
|
test -e /var/log/oxdata || (mkdir -p /var/log/oxdata && chown $USER:$USER /var/log/oxdata)
|
||||||
cd $VENV/oxdata
|
test -e /var/run/oxdata || (mkdir -p /var/run/oxdata && chown $USER:$USER /var/run/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
|
end script
|
||||||
|
|
||||||
|
exec start-stop-daemon \
|
||||||
|
--pidfile /var/run/oxdata/oxdata.pid \
|
||||||
|
--start -c $USER -d $VENV/oxdata \
|
||||||
|
--exec $VENV/bin/gunicorn_django -- \
|
||||||
|
--bind 127.0.0.1:8087 \
|
||||||
|
--workers 5 \
|
||||||
|
--max-requests 1000 \
|
||||||
|
--log-file /var/log/oxdata/oxdata.log \
|
||||||
|
--pidfile /var/run/oxdata/oxdata.pid \
|
||||||
|
--log-level info
|
||||||
|
|
Loading…
Reference in a new issue