# Collect issued certificates (and deploy them) every 15 minutes, and mail a
# health summary when something needs attention.
#
# Install with: crontab -e
SHELL=/bin/sh
PATH=/usr/local/bin:/usr/bin:/bin
CONFIG=$HOME/.config/pycert/pycert.toml

*/15 * * * *  pycert -q --config "$CONFIG" watch --once >> "$HOME/.local/state/pycert-watch.log" 2>&1

# cron mails any output: 'check' prints only when the level is not OK.
17 7 * * *    out=$(pycert --config "$CONFIG" check --warn 30 --crit 7 -v) || echo "$out"
