renew
Monitor expiration of domains, certificates and events.
Installation
Installation can be done using go:
$ go install foutaise.org/fossil/renew@latest
or by cloning this repository using fossil:
$ fossil clone https://foutaise.org/fossil/renew
$ cd renew
$ make
$ sudo make install
Dependencies
renew depends on the whois command line.
Usage
Monitor expiration of domains, certificates and events.
Usage: renew [<cfgfile>]
Options:
-d uint
minimum valid days before reporting (default 7)
-t uint
TCP connection timeout in seconds (default 5)
-v verbose mode
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
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
Specify an explicit event.
Examples:
event 2019-12-04 renew passport