Now one can add arguments to the command controlled by supervisor. You have to give all arguments between [] like this: [arg1 arg2 arg3]. This way one can use ctl scripts generated by other recipes and give them the appropriate argument to make them run in foreground. An example:
For more info: http://pypi.python.org/pypi/collective.recipe.supervisor
UPDATE: After a discussion with Chris Mc Donough, I updated this post. For zope instances and zeo instances, please use the runzope and runzeo scripts instead of instance and zeo
[buildout]
parts =
instance1
supervisor
[instance1]
...
[supervisor]
recipe = collective.recipe.supervisor
port = 9001
user = mustapha
password = secret
serverurl = http://supervisor.mustap.com
programs =
10 instance1 ${buildout:bin-directory}/instance1 [fg] ${instance1:location}
10 instance1 ${instance1:location}/bin/runzope ${instance1:location}
20 myprog /mypath/bin/myprog [-n 100] /mypath
For more info: http://pypi.python.org/pypi/collective.recipe.supervisor
UPDATE: After a discussion with Chris Mc Donough, I updated this post. For zope instances and zeo instances, please use the runzope and runzeo scripts instead of instance and zeo
23 May 2008 18:07:51
Cool!
Note however that the "instance" script Plone uses to start Zope when passed "fg" appears to use os.system, so the process that supervisor is controlling isnt actually Plone, it's the controller script. This means that "stop" and "start" tend to not do what you want. It's far better to use "runzope", which actually execs the Python process which becomes Zope. See also http://supervisord.org/manu...
24 May 2008 12:47:08
thx Chris, I updated this post and will update the examples and tests in the package