Sysadmin

Certificate Expiry Checking Script

Here’s a script I wrote a while ago for checking a bunch of domains to see if their certificates have expired using openssl. Just add your domains to the @domains list. At work we have a cronjob that does this every day: checkcerts -d 31 | mail -e -s"SSL Certificates Expiring Within a Month" systems@... #!/usr/bin/perl -w # checkcerts # Barney Livingston 2008-11-18 use strict; use Date::Parse; use Date::Format; use POSIX qw(floor); use Getopt::Long; my $days = 9999999999; #about 27 million years should be enough my $help; GetOptions( "days=i" => \$days, "help" => \$help ); if ($help) { print <<"END"; Usage: checkcerts [options] --days -d <days> Only show certificates due to expire within <days> days.
Read more