+
+ execute "certbot-delete-#{name}" do
+ command "/usr/bin/certbot delete --config-dir /srv/acme.openstreetmap.org/config --work-dir /srv/acme.openstreetmap.org/work --logs-dir /srv/acme.openstreetmap.org/logs --cert-name #{name}"
+ cwd "/srv/acme.openstreetmap.org"
+ user "letsencrypt"
+ group "letsencrypt"
+ end
+end
+
+template "/srv/acme.openstreetmap.org/bin/check-certificates" do
+ source "check-certificates.erb"
+ owner "root"
+ group "root"
+ mode "755"
+ variables :certificates => certificates
+end
+
+cron_d "letencrypt-renew" do
+ minute "00"
+ hour "*/12"
+ user "letsencrypt"
+ command "/srv/acme.openstreetmap.org/bin/renew"
+ mailto "admins@openstreetmap.org"
+end
+
+cron_d "letencrypt-check" do
+ minute "30"
+ hour "*/12"
+ user "letsencrypt"
+ command "/srv/acme.openstreetmap.org/bin/check-certificates"
+ mailto "admins@openstreetmap.org"