CARVIEW |
Select Language
HTTP/2 200
server: nginx
content-type: text/html;charset=utf-8
cache-control: must-revalidate
expires: Fri, 01 Jan 1999 00:00:00 GMT
set-cookie: trac_form_token=3c20eda5ccc9027de38eaa7c; HttpOnly; Path=/; Secure
set-cookie: trac_session=c0e71ff1a47926988fcb570f; expires=Tue, 21 Oct 2025 05:26:40 GMT; HttpOnly; Path=/; Secure
strict-transport-security: max-age=31536000; includeSubDomains; preload
permissions-policy: interest-cohort=()
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
accept-ranges: bytes
via: 1.1 varnish, 1.1 varnish
date: Wed, 23 Jul 2025 05:26:40 GMT
x-served-by: cache-fra-etou8220085-FRA, cache-bom-vanm7210088-BOM
x-cache: MISS, MISS
x-cache-hits: 0, 0
x-timer: S1753248401.528841,VS0,VE329
vary: Accept-Encoding
InitdScriptForGentooLinux – Django
Back to Top
Django
The web framework for perfectionists with deadlines.
Issues
Django FastCGI init.d script for Gentoo Linux
If you're not using Gentoo Linux and for more information about FastCGI/init.d go back to Django FastCGI init.d script for Linux
The initialisation script
This version uses TCP connections. I'm working on a socket-version too.
#!/sbin/runscript DJANGO_SITES="site1 site2 site3" SITES_PATH=/var/django/sites RUNFILES_PATH=/var/django/run HOST=127.0.0.1 PORT_START=3000 start() { ebegin "Starting django-fgci" PORT=$PORT_START for SITE in $DJANGO_SITES do VERBOSE_NAME="$SITE $HOST:$PORT" if [ -f $RUNFILES_PATH/$SITE.pid ]; then ewarn "$VERBOSE_NAME already running ($RUNFILES_PATH/$SITE.pid)" else start-stop-daemon --start \ --pidfile $RUNFILES_PATH/$SITE.pid \ --exec /usr/bin/env python \ $SITES_PATH/$SITE/manage.py runfcgi \ method=threaded \ host=$HOST port=$PORT pidfile=$RUNFILES_PATH/$SITE.pid chmod 400 $RUNFILES_PATH/$SITE.pid einfo "$VERBOSE_NAME started" fi let "PORT = $PORT + 1" done eend $? } stop() { ebegin "Stopping django-fgci" for SITE in $DJANGO_SITES do VERBOSE_NAME="$SITE" start-stop-daemon --stop \ --pidfile $RUNFILES_PATH/$SITE.pid \ && einfo "$VERBOSE_NAME stopped" \ || ewarn "$VERBOSE_NAME not running" if [ -f $RUNFILES_PATH/$SITE.pid ]; then rm $RUNFILES_PATH/$SITE.pid fi done eend $? }
Note: If the init script appears to start successfully, but the FastCGI process is not started, try appending the --oknodo argument to start-stop-daemon.
Last modified
14 years ago
Last modified on Jun 14, 2011, 7:13:33 AM
Note:
See TracWiki
for help on using the wiki.
Download in other formats:
Django Links
Learn More
Get Involved
Follow Us
- Hosting by In-kind donors
- Design by Threespot &
© 2005-2025 Django SoftwareFoundation unless otherwise noted. Django is a registered trademark of the Django Software Foundation.