Send mail when renew certificat


Hello everyone
I was in the testing phase to check that everything was going well on a domain.
The renewal being done correctly I will pass all of my domains.
However before that, I would have liked to receive an e-mail when a certificate is renewed.
Could you tell me how? For the renewal I use /etc/cron.d/certbot without any change.
Thank you in advance for your help.

I ran this command:0 */12 * * * root test -x /usr/bin/certbot -a ! -d /run/systemd/system && perl -e ‘sleep int(rand(3600))’ && certbot -q renew

It produced this output:Ok
My operating system is (include version): debian 8
My web server is (include version):Apache2
I can login to a root shell on my machine:yes
I’m using a control panel to manage my site :no


The -q stands for quiet, if you remove it, certbot will tell cron everything…


Beyond that, there is a feature called --renew-hook which lets you specify the location of a script to be run when a renewal occurs. There are also environment variables that can indicate the renewed certificate(s).


Thank you for your answers and sorry for this late acknowledgment.
I will look at this more closely, but I first focused on the https passage of the sites I manage, for now and by speed I headed to monit that I use for other tracking


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.