码迷,mamicode.com
首页 > 编程语言 > 详细

python django 的启动脚本

时间:2014-11-26 01:33:13      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:ar   os   sp   for   on   log   ef   as   tt   

#!/bin/bash

# Replace these three settings.
PROJDIR="/var/www/t_receive_interface"
PIDFILE="/var/run/django.pid"
SOCKET="/tmp/django.sock"
OUTLOGFILE="/var/log/django/access.out.log"
ERRLOGFILE="/var/log/django/error.log"

cd $PROJDIR
if [ -f $PIDFILE ]; then
    kill `cat -- $PIDFILE`
    rm -f -- $PIDFILE
fi

# as harbin
#exec python manage.py runfcgi maxchildren=1 maxspare=1 minspare=1 pidfile=$PIDFILE host=127.0.0.1 port=8088 method=prefork outlog=$OUTLOGFILE errlog=$ERRLOGFILE

# as  Bejing  
#exec python manage.py runfcgi maxchildren=4 maxspare=2 minspare=2 pidfile=$PIDFILE host=127.0.0.1 port=8088 method=prefork outlog=$OUTLOGFILE errlog=$ERRLOGFILE
#self
exec python manage.py runfcgi maxchildren=6 maxspare=3 minspare=3 pidfile=$PIDFILE host=127.0.0.1 port=8088 method=prefork outlog=$OUTLOG    FILE errlog=$ERRLOGFILE

#exec python manage.py runfcgi maxchildren=20 maxspare=20 minspare=15 pidfile=$PIDFILE socket=$SOCKET method=prefork umask=777
#chmod 777 $SOCKET

python django 的启动脚本

标签:ar   os   sp   for   on   log   ef   as   tt   

原文地址:http://my.oschina.net/innovation/blog/348765

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!