We’ve used daemontools to daemonise our TurboGears server under FreeBSD here at zettai.net.
daemontools was installed, we just needed to hook into the system. Since this took a bit of time to figure out if I give some pointers then, hopefully, future TGers won’t have the same hassle. I used the lighttpd configuration for serving over port 80, it worked fine.
daemontools is a collection of tools for managing UNIX services.
supervise monitors a service. It starts the service and restarts the service if it dies. Setting up a new service is easy: all supervise needs is a directory with a run script that runs the service.
We’ve linked our source directory from
ln -s /directory/to/src/showmedo
/directory/to/src/showmedo we have a
run script containing
exec /usr/local/bin/softlimit setuidgid www python /directory/to/src/showmedo/showmedo-start.py
I also had to modify the
showmedo-start.py file to include the following just after line 7’s
import os from a note here.
os.environ['PYTHON_EGG_CACHE'] = '/usr/local/www/.python-eggs'
/usr/local/www/.python-eggs has permissions 755 and is owned by
Let us know if this helps you out?If you enjoyed this post, make sure you subscribe to my RSS feed!