If the env var XDG_CACHE_HOME is set, the cache directory is
"$XDG_CACHE_HOME/ianardap", else if HOME is set, it is
"$HOME/.ianardapcaches", else no cache is used but a loud
warning is displayed at the end of the result to encourage
users to set a cache directory.
Adapted pytest tests, no change needed on test_exe_matrix. They are
obviously slower with no cache. NB: two tests now fail independently
of this change.
Issue: #4
Add an option to return the expiration date in unixtime (time since
epoch).
./check_expire -H domain -u
It's particularly useful for alerting or monitoring systems that do
their own calculation based on the metric they receive (and not based on
exit codes).
For instance you can use the following in zabbix 5.4:
- item: check_expire["-H","{HOST.CONN}","-u"]
- trigger: last(/check_expire["-H","{HOST.CONN}","-u"])-now()<2592000
Where 2592000 is 30 days in seconds.