]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/letsencrypt/files/default/bin/check-certificate
Start reminding about expiry at 21 days
[chef.git] / cookbooks / letsencrypt / files / default / bin / check-certificate
index d292b562250e476f6218b049ebb7b3ab5c2db5f3..303314fcab2af17abd12359433ba6465a9094e5c 100755 (executable)
@@ -10,7 +10,7 @@ begin
 
   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" }