Changes between Version 3 and Version 4 of InitdScriptForDebian
- Timestamp:
- Apr 23, 2010, 4:47:43 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InitdScriptForDebian
v3 v4 9 9 10 10 The settings may be overridden in a settings file located at {{{/etc/defaults/django}}}. You must at least set the {{{DJANGO_SITES}}} variable. An example is included below. 11 12 You can also have sites run in their own [http://pypi.python.org/pypi/virtualenv virtualenv] by creating one with the same name as the Django site in {{{/var/run/django/environments}}}. 11 13 12 14 == {{{/etc/init.d/django}}} == … … 36 38 # <basti AT redtoad.de> 37 39 # 38 # Version: @(#)fastcgi 0. 4 28-Jul-2009 basti AT redtoad.de40 # Version: @(#)fastcgi 0.5 19-Nov-2009 basti AT redtoad.de 39 41 # 40 42 … … 48 50 # path to the directory with your django projects 49 51 SITES_PATH=/var/lib/django 52 53 # path to the directory conrtaining all site-specific virtualenvs 54 # (see http://pypi.python.org/pypi/virtualenv for more information) 55 ENVIRONMENT_PATH=$SITES_PATH/environment 50 56 51 57 # path to the directory for socket and pid files … … 86 92 { 87 93 # Starting all Django FastCGI processes 88 # PORT=$PORT_START89 94 for SITE in $DJANGO_SITES 90 95 do 91 96 echo -n " $SITE" 97 98 # find python binary to use 99 if [ -f $ENVIRONMENT_PATH/$SITE/bin/python ]; then 100 PYTHON=$ENVIRONMENT_PATH/$SITE/bin/python 101 else 102 PYTHON=`which python` 103 fi 104 92 105 if [ -f $RUNFILES_PATH/$SITE.pid ]; then 93 106 echo -n " already running" … … 95 108 start-stop-daemon --start --quiet \ 96 109 --pidfile $RUNFILES_PATH/$SITE.pid \ 97 --chuid $RUN_AS --exec /usr/bin/env -- python\110 --chuid $RUN_AS --exec /usr/bin/env -- $PYTHON \ 98 111 $SITES_PATH/$SITE/manage.py runfcgi \ 99 112 protocol=fcgi method=threaded maxrequests=$MAXREQUESTS \ … … 179 192 #SITES_PATH=/home/django/projects 180 193 194 # path to the directory conrtaining all site-specific virtualenvs 195 # (see http://pypi.python.org/pypi/virtualenv for more information) 196 ENVIRONMENT_PATH=$SITES_PATH/environment 197 181 198 # path to the directory for socket and pid files 182 199 RUNFILES_PATH=$SITES_PATH/run