Commit c37fc5df authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'fasterrenewal' into 'master'

Faster certificate renewal

See merge request !11
parents 9f5ce59c e58e3d92
Pipeline #1057 passed with stages
in 4 minutes and 31 seconds
......@@ -47,7 +47,7 @@ package AWIT::CertMaster;
use strict;
use warnings;
our $VERSION = '1.07';
our $VERSION = '1.08';
BEGIN {
......@@ -556,8 +556,8 @@ sub _webserverCheckCertificates
my $remainingTime = $parsedCert->{'notafter'}->epoch() - $now->epoch();
my $daysToExpire = $remainingTime / 86400;
# Check remaining time
if ($daysToExpire < 15) {
$self->logger("WARNING","WEBSERVER: - Certificate for vhost '%s' expires in under 15 days, adding to regeneration list",$vhostName);
if ($daysToExpire < 25) {
$self->logger("WARNING","WEBSERVER: - Certificate for vhost '%s' expires in under 25 days, adding to regeneration list",$vhostName);
next;
}
......@@ -579,7 +579,7 @@ sub _webserverCheckCertificates
# Output a notice if the cert will be re-applied for in the next 3 days
if ($daysToExpire < 30) {
$self->logger("NOTICE","WEBSERVER: - Certificate for vhost '%s' expires soon, it will be renewed in %s days",$vhostName,ceil($daysToExpire - 15));
$self->logger("NOTICE","WEBSERVER: - Certificate for vhost '%s' expires soon, it will be renewed in %s days",$vhostName,ceil($daysToExpire - 25));
}
SKIP:
......@@ -1791,7 +1791,7 @@ use Getopt::Long;
my $NAME = "AWIT-CertMaster";
our $VERSION = "1.1.10";
our $VERSION = "1.1.11";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment