[buildout]
parts = oood-instance

[configuration]
oood_conf_file = ${buildout:etc-directory}/oood.conf
oood_log_file = ${buildout:log-directory}/oood.log
oood_run = ${buildout:var-directory}/oood
oood_tmp = ${:oood_run}
oood_host = 127.0.0.1
oood_port = 8008
oood_pool_host = localhost
oood_pool_range_start = 4060
oood_instance_load_time = 20
oood_instance_timeout = 360
oood_virtual_display_id = 99


[oood-etc]
recipe = collective.recipe.template
input = ${buildout:directory}/templates/oood.conf.in
output = ${configuration:oood_conf_file}

[oood-instance]
depends = ${oood-etc:output}
recipe = collective.recipe.template
input = ${buildout:directory}/templates/oood-runserw.in
output = ${buildout:data-bin-directory}/oood-runserw

[start-oood-instance]
depends = ${oood-instance:output}
recipe = plone.recipe.command
command =
  ${buildout:data-bin-directory}/oood-runserw --start &
  sleep 5
update-command = ${:command}

[stop-oood-instance]
depends = ${oood-instance:output}
recipe = plone.recipe.command
command =
  ${buildout:data-bin-directory}/oood-runserw --stop &
  sleep 5
update-command = ${:command}

[requirements]
binary = Xvfb