feat: monitor certificate

This commit is contained in:
f 2024-09-14 17:23:10 -03:00
parent b52598d1f7
commit 056f73fc8f
No known key found for this signature in database

View file

@ -22,6 +22,15 @@ case $1 in
test -n "${NETWORKS}" && postconf -e mynetworks="${NETWORKS}" test -n "${NETWORKS}" && postconf -e mynetworks="${NETWORKS}"
if ! test -f /etc/monit.d/cert.conf ; then
cat >/etc/monit.d/cert.conf <<MONIT
check file certificate with path /etc/letsencrypt/live/${SUTTY}/fullchain.pem
if does not exist then alert
if changed checksum then exec "/usr/sbin/postfix reload"
MONIT
monit reload
fi
;; ;;
stop) ;; stop) ;;
esac esac