Saturday, September 18, 2010

Upstart script

Does anyone have an upstart script that they use with manage.py
runfcgi?

I have come up with the one below, but it hangs when I try to start
it.
I've tried other scripts, but they either spawn lots of instances or
don't respawn when the main instance dies.

Any help would be appreciated.


# configuration variables.
# You'll want to change thse as needed
env DJANGO_HOME=/home/django/
env DJANGO_PORT=8080
env DJANGO_HOST=127.0.0.1

respawn

expect daemon

exec /usr/bin/python /home/django/project/manage.py runfcgi
method=prefork host=$DJANGO_HOST port=$DJANGO_PORT minspare=1
maxspare=2 daemonize=false pidfile='/home/django/project/django.pid' --
pythonpath='/home/django/project/packages'

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate