From fa27187f1122d95628bdaeb8c8106e3314ac1686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Kar=C3=A9kinian?= Date: Thu, 14 Mar 2019 10:49:47 +0100 Subject: [PATCH] Switch from the git version of certbot to the Ubuntu PPA --- site-cookbooks/kosmos-base/recipes/letsencrypt.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/site-cookbooks/kosmos-base/recipes/letsencrypt.rb b/site-cookbooks/kosmos-base/recipes/letsencrypt.rb index 4db4544..6b4139c 100644 --- a/site-cookbooks/kosmos-base/recipes/letsencrypt.rb +++ b/site-cookbooks/kosmos-base/recipes/letsencrypt.rb @@ -7,14 +7,14 @@ # All rights reserved - Do Not Redistribute # -git "/usr/local/certbot" do - repository "https://github.com/certbot/certbot" - action :sync - revision "v0.26.1" - user "root" - group "root" +# Install certbot and set up hooks + +apt_repository "certbot" do + uri "ppa:certbot/certbot" end +package "certbot" + letsencrypt_renew_hook = <<-EOF #!/usr/bin/env bash @@ -55,5 +55,5 @@ cron "renew Let's Encrypt certificates" do hour "4" mailto "logs@5apps.com" # The hook is only executed if a cert has been renewed - command "/usr/local/certbot/certbot-auto renew --deploy-hook letsencrypt_renew_hook -n 1> /dev/null" + command "/usr/bin/certbot renew --deploy-hook letsencrypt_renew_hook -n 1> /dev/null" end