[Zope3-Users] Re: Buildout recipe to create config file from
contents in buildout.cfg?
Jürgen Kartnaller
juergen at kartnaller.at
Sat Sep 29 07:22:28 EDT 2007
Derek Richardson wrote:
> I am using hexagonit.recipe.cmmi to install pound (www.apsis.ch/pound)
> in front of zope. After I cmmi, I need to install a config file. I'd
> like to include the pound config file in buildout.cfg, like the zcml
> section in zc.zope3recipes:application. Is there a simple recipe for
> making a file out of a section in the buildout.cfg and putting it in a
> particular place? Or is there a 'best' recipe to use to get close? Or is
> this a reason to write a new recipe from scratch and contribute it? I
> see this simple functionality as having many use cases.
Hi Derek,
this is how we setup our nginx with buildout in front of zope:
[nginx]
recipe = zc.recipe.cmmi
url = http://sysoev.ru/nginx/nginx-0.5.31.tar.gz
extra_options = --with-poll_module
[nginx-ctl]
recipe = lovely.recipe:mkfile
path = ${buildout:bin-directory}/nginx
mode = 0755
content =
#!/bin/sh
PIDFILE=${nginx:location}/logs/nginx.pid
case "$1" in
start)
${nginx:location}/sbin/nginx -c
${buildout:directory}/src/lovelybooks/nginx.conf
;;
stop)
kill -QUIT `cat $PIDFILE`
;;
reload)
kill -HUP `cat $PIDFILE`
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $SCRIPTNAME
{start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
Here we create a start script using lovely.recipe.mkfile .
lovely.recipe also containe mkdir to create a directory.
Hope this helps.
Jürgen
>
> Thanks,
>
> Derek
More information about the Zope3-users
mailing list