[buildout]

extends =
  ../../component/apache/buildout.cfg
  ../../component/curl/buildout.cfg
  ../../component/dash/buildout.cfg
  ../../component/dcron/buildout.cfg
  ../../component/openssl/buildout.cfg

parts =
  slapos-cookbook
  dcron
  download-static-files
  monitor-eggs
  extra-eggs
  monitor-bin
  monitor-template
  rss-bin

[monitor-eggs]
recipe = zc.recipe.egg
eggs =
  collective.recipe.template
  cns.recipe.symlink

[extra-eggs]
recipe = zc.recipe.egg
interpreter = pythonwitheggs
eggs =
  PyRSS2Gen
  Jinja2

[make-rss-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/make-rss.sh.in
md5sum = 98c8f6fd81e405b0ad10db07c3776321
output = ${buildout:directory}/template-make-rss.sh.in
mode = 0644

[monitor-template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/monitor.cfg.in
output = ${buildout:directory}/monitor.cfg
filename = monitor.cfg
md5sum = bd592a0f0c41ec15c643c4e91e9ec5cc
mode = 0644

[monitor-bin]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
md5sum = 1e7b4698f6627150b1eb783b06f8b13a
destination = ${buildout:directory}/parts/monitor-template-monitor-bin
filename = monitor.py.in
mode = 0644

[index]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/webfiles/${:filename}
download-only = true
md5sum = 91ac749f86aecc0c383d93e51e15a572
destination = ${buildout:directory}/parts/monitor-index
filename = index.cgi.in
mode = 0644

[index-template]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/webfiles/${:filename}
download-only = true
destination = ${buildout:directory}/parts/monitor-template-index
md5sum = e0d2aaeffc046b2ac6d9d717e1ba321d
filename = index.html.jinja2
mode = 0644

[status-cgi]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/webfiles/${:filename}
download-only = true
md5sum = aa2764cab87e457410435974f729e906
destination = ${buildout:directory}/parts/monitor-template-status-cgi
filename = status.cgi.in
mode = 0644

[settings-cgi]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/webfiles/${:filename}
download-only = true
md5sum = 18574b804da0c65d8670959f9e7c4774
destination = ${buildout:directory}/parts/monitor-template-settings-cgi
filename = settings.cgi.in
mode = 0644

[rss-bin]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
md5sum = 5f1b93ccdea7c3031aef396154c64938
destination = ${buildout:directory}/parts/monitor-template-rss-bin
filename = status2rss.py
mode = 0644

[dcron-service]
recipe = slapos.recipe.template
url = ${template-dcron-service:output}
output = $${directory:services}/crond
mode = 0700
logfile = $${directory:log}/crond.log

[download-static-files]
recipe = hexagonit.recipe.download
url = https://github.com/SlapOS/staticForMonitoring/blob/db670e7568871c69a64916d462ccb57629f1c77d/static-files.tar.gz?raw=true
download-only = true
md5sum = 9e3feb2b520620d5b8d478eb9a9be6de
filename = static-files.tar.gz
destination = ${buildout:directory}/parts/monitor-static-files
mode = 0644