Start reminding about expiry at 21 days
authorTom Hughes <tom@compton.nu>
Fri, 26 Jan 2018 10:23:45 +0000 (10:23 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 26 Jan 2018 10:23:45 +0000 (10:23 +0000)
cookbooks/letsencrypt/files/default/bin/check-certificate

index d292b56..303314f 100755 (executable)
@@ -10,7 +10,7 @@ begin
 
   if Time.now < certificate.not_before
     puts "Certificate #{domain} not valid until #{certificate.not_before}"
 
   if Time.now < certificate.not_before
     puts "Certificate #{domain} not valid until #{certificate.not_before}"
-  elsif certificate.not_after - Time.now < 14 * 86400
+  elsif certificate.not_after - Time.now < 21 * 86400
     puts "Certificate #{domain} expires at #{certificate.not_after}"
   else
     subject_alt_name = certificate.extensions.find { |e| e.oid == "subjectAltName" }
     puts "Certificate #{domain} expires at #{certificate.not_after}"
   else
     subject_alt_name = certificate.extensions.find { |e| e.oid == "subjectAltName" }