[buildout]
extends =
  ../coreutils/buildout.cfg
  ../patch/buildout.cfg
  ../randomsleep/buildout.cfg

parts = dcron-output

[dcron]
recipe = slapos.recipe.cmmi
shared = false
url = http://www.jimpryor.net/linux/releases/dcron-4.5.tar.gz
md5sum = 078833f3281f96944fc30392b1888326
configure-command = true
patch-binary = ${patch:location}/bin/patch
patches =
  ${:_profile_base_location_}/noroot-no-globals.patch#623379916f48bd8292a28057c8bd30f7
patch-options = -p1
make-options =
  PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
post-install =
  chmod u-s %(location)s/bin/crontab
dummy = ${randomsleep:recipe}

[dcron-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:crond} -a -x ${:crontab} -a ! -u ${:crontab}
crond = ${dcron:location}/sbin/crond
crontab = ${dcron:location}/bin/crontab
