Updated start script to store err/out logs, also use daemon mode

This commit is contained in:
2010-10-28 10:58:26 +01:00
parent ea3f7e2783
commit 49470765ac
2 changed files with 9 additions and 4 deletions

View File

@@ -1,13 +1,16 @@
#!/bin/bash
PIDFILE='auth.pid'
ROOT=`pwd`
PIDFILE=$ROOT/logs/auth.pid
mkdir logs 2> /dev/null
if [ -f $PIDFILE ]; then
kill `cat -- $PIDFILE`
kill `cat -- $PIDFILE` 2> /dev/null
rm -f -- $PIDFILE
fi
sleep 1
cd $ROOT
source ./env/bin/activate
./manage.py runfcgi daemonize=false pidfile=$PIDFILE host=127.0.0.1 port=9981 &
exit 0
./manage.py runfcgi daemonize=true pidfile=$PIDFILE host=127.0.0.1 port=9981 errlog=$ROOT/logs/stderr.log outlog=$ROOT/logs/stdout.log