check-ssl-certs
===============
Displays status of certificates, or emails when there are warnings, expirations, or missing certificates.

To run from cron or a systemd timer: check-ssl-certs --check
To display certificates status in terminal: check-ssl-certs
To display certificates status in terminal sorted by expiration: check-ssl-certs --expires
To display help: check-ssl-certs --help
Manpage: man check-ssl-certs

For Certbot, $certdir should be: /etc/letsencrypt/live
$certdir is the directory the FQDNs are in, ie: /path/to/certs/example.com would be /path/to/certs

Configuration variables you can set in /etc/check-ssl-certs.conf.php
--------------------------------------------------------------------------------------------------
$mailfrom            email address report is sent by          default: 'root'
$mailfromname        name of email sender                     default: 'SSL Expiration Monitor'
$mailto              email addeess report is sent to          default: 'root'
$certdirs            directories LetsEncrypt certs are in     default: '/etc/ssl/dehydrated'
                                                                   and '/etc/letsencrypt/live'
$apachesites         directory Apache site configs are in     default: '/etc/apache2/sites-enabled'
$nginxsites          directory nginx site configs are in      default: '/etc/nginx/sites-enabled'
$sslexpirewarndays   days before expiration to warn about     default: 21
$checkwebs           whether or not to check Web site configs default: TRUE
$checkcertdirs       whether or not to check LetsEncrypt dirs default: TRUE

See: check-ssl-certs.conf-sample.php

Running check-ssl-certs automatically
=====================================
To run from /etc/cron.d see: check-ssl-certs.cron
To run from systemd timer see: check-ssl-certs.service and check-ssl-certs.timer

