Monitor expiration of domains, certificates and events.
Installation
Clone this repository using fossil:
$ fossil clone https://foutaise.org/fossil/renew
$ cd renew
$ make
Usage
Monitor expiration of domains, certificates and events.
Usage: renew [<cfgfile>]
Options:
-v : verbose mode
-d <uint> : minimum valid days before reporting (default 7)
-t <uint> : TCP connection timeout in seconds (default 5)
Example
setup config file
$ cat renew.cfg
tls cern.ch:443
tls google.com:443
tls smtp.gmail.com:465
domain foutaise.org
event 2019-12-04 renew passport
list entries below 7 days of validity
$ renew renew.cfg
Entries below the validity limit are displayed and renew exit with status code 1.
verbose mode
$ renew -v renew.cfg
2018-03-07 tls google.com:443 (47 days)
2018-04-04 tls smtp.gmail.com:465 (75 days)
2019-01-12 tls cern.ch:443 (359 days)
2019-01-23 domain foutaise.org (369 days)
2019-12-04 event renew passport (684 days)
list entries below 50 days of validity
$ renew -d 50 renew.cfg
2018-03-07 tls google.com:443 (47 days)
quick check from stdin
$ renew -v
domain openbsd.org
^D
2023-10-11 domain openbsd.org (2090 days)
Config file
The config file handle 3 kinds of checks:
domain <domain>
Check domain expiration.
Examples:
domain foutaise.org
domain openbsd.org
Be aware that some TLD might not be supported, as the whois database can't be queried directly (.ch for example), or expiry date is not publicly available.
tls <host:port> [servername]
Check certificate expiration for host (or specific servername).
Examples:
tls cern.ch:443
tls smtp.gmail.com:465
tls 192.168.1.10:443 my.domain.com
event <YYYY-MM-DD> <comment>
Specify an explicit event.
Examples:
event 2019-12-04 renew passport