From 316e943609c343dd5e699f2600f8b6aaf2dd6478 Mon Sep 17 00:00:00 2001 From: benoitc Date: Sat, 20 Feb 2010 23:18:16 +0100 Subject: [PATCH] Use example of doc --- examples/gunicorn_rc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/gunicorn_rc b/examples/gunicorn_rc index 1c113478..c5841f73 100755 --- a/examples/gunicorn_rc +++ b/examples/gunicorn_rc @@ -1,9 +1,12 @@ #!/bin sh -if [ -f /var/run/gunicorn.pid ]; then - rm /var/run/gunicorn.pid -fi +GUNICORN=/usr/local/bin/gunicorn +ROOT=/path/to/project +PID=/var/run/gunicorn.pid -cd /path/to/project -exec /usr/local/bin/gunicorn -C /path/to/project/gunicorn.conf.py \ - --pidfile=/var/run/gunicorn.pid main:application \ No newline at end of file +APP=main:application + +if [ -f $PID ]; then rm $PID fi + +cd $ROOT +exec $GUNICORN -C $ROOT/gunicorn.conf.py --pidfile=$PID $APP