On 2007-02-16 16:39:53 -0500, Richard Harding wrote: > The next step is to see if I can tell each application in supervisord to > open/start in a specific working directory so that I don't have to hard > code paths in prod.cfg.
With supervisor1, I generally make start scripts like: #!/bin/bash cd $1 exec python start-myapp.py $2 And then the supervisord.conf section looks like <program myapp> command /path/to/myapp/start.sh /path/to/my/app prod.cfg ... </program> Ie, just pass in the directory to run it in as a parameter. I guess start.sh could be rewritten in python and make use of __file__ to figure out where it lives on its own. I like the simplicity of a bash script though. -- anders pearson : http://www.columbia.edu/~anders/ C C N M T L : http://www.ccnmtl.columbia.edu/ weblog : http://thraxil.org/
pgp7fnunIVmUF.pgp
Description: PGP signature

