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 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" }