Import file age checker
[infodrom/icinga-plugins] / check_ssl_certificate
old mode 100644 (file)
new mode 100755 (executable)
index cf3385c..bc96d45
@@ -55,7 +55,7 @@
 use strict;
 use Time::Local;
 use Getopt::Long;
-use lib "/usr/lib64/nagios/plugins";
+use lib "/usr/lib/nagios/plugins";
 use utils qw(%ERRORS &print_revision &support &usage);
 
 my $PROGNAME="check_ssl_certificates";
@@ -130,7 +130,7 @@ close(OPENSSL);
 $date =~ s/ +/ /g;
 
 my ($month, $day, $hour, $min, $sec, $year, $tz) = split(/[\s+|:]/, $date);
-print "m=$month, d=$day, h=$hour, m=$min, s=$sec, y=$year, z=$tz\n";
+printf "Expiry date: %d %s %d, %d:%02d:%02d %s\n", $day, $month, $year, $hour, $min, $sec, $tz;
 
 my $daysLeft = int((timegm($sec, $min, $hour, $day, $months{$month}, $year - 1900) - time()) / 86400);