This script checks whether the expiry date of the SSL certificates of one or multiple domains will be in less than X (default 25) days.
check_certificates.php [<DOMAIN>[:days]] .. [<DOMAIN>[:days]]
Parameters:
Note: As soon as command line parameters are used, the config.ini will be ignored.
check_certificates.php example.de:10
or alternatively
check_certificates.php
and the following section inside the config.ini
[check_certificates]
domains[example.de]=10
both indicate that the ssl certificate of the domain 'example.de' should be checked and a warning should be given in case the domain is less than 10 days valid.
Side note: We usually use the config.ini for configuration and trigger this script once a week through a crontab entry.
#Certificate check
0 7 * * 7 <path to check_certificates.php>