From: Michael Howe Date: Mon, 8 Jan 2018 15:28:49 +0000 (+0000) Subject: Add check_cert and deal with messed-up changelog X-Git-Tag: 0.23~14 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7e6d267642157840aee5e248688519080ea384df;p=packages%2Fn%2Fnagios-plugins-local.git Add check_cert and deal with messed-up changelog --- diff --git a/debian/changelog b/debian/changelog index 1a744b3..3287de5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,11 @@ nagios-plugins-local (0.17) unstable; urgency=medium - improve various aspects: + list all unmonitored services, not just the first + exit with unknown state if can't connect to monit's web interface + * check_cert + - fix CN-test regex (in stretch, it looks like openssl includes a space + for 'CN = '). - -- Michael Howe Sat, 09 Dec 2017 22:20:59 +0000 + -- Michael Howe Fri, 22 Dec 2017 23:42:09 +0000 nagios-plugins-local (0.16) unstable; urgency=medium diff --git a/plugins/check_cert b/plugins/check_cert index feec88b..824a912 100755 --- a/plugins/check_cert +++ b/plugins/check_cert @@ -224,7 +224,7 @@ sub parse_certificate { $result{'not_before'} = str2time($1); } elsif ($line =~ /^\s+Not After : (.*)$/ ){ $result{'not_after'} = str2time($1); - } elsif ($line =~ /^\s+Subject:.*, CN=(.*)$/ ){ + } elsif ($line =~ /^\s+Subject:.*, CN\s*=\s*(.*)\s*$/ ){ $result{'cn'} = $1; } }