Renew notice after create a cron job


#1

a few months back, I installed let’s encript SSL and created a cron job. I assume that will automatically take care of the renewal, but i recently received email Let’s Encrypt certificate expiration notice, does that mean cron job i created is not effective?


#2

without your domain name ( and those in the email) it’s impossible to say for certain.

What commonly happens is someone creates a certificate for “domain.com” and then realises they needed to create it for both “domain.com” and “www.domain.com” so they do so. The cron correctly renews the certificate bot both domains, but the original one for just “domain.com” is not renewed, as it’s no longer needed - and people get an email about this domain. If this is the case for you, I can’t say, without additional information.


#3

That depends on how you setup your cron job in the first place, did you make your cron email you the log file every time it runs ??

This is how my cron runs and it works flawlessly

sudo nano /bin/certbotrenew.sh

paste these contents below into nano and change the email address your email address

#!/bin/bash
cd /opt/certbot
sudo ./certbot-auto renew >> /var/log/certbot-renew.log
sudo service nginx reload
mail -s "CERTBOT Renewals" youremail@wherever.com < /var/log/certbot-renew.log
exit 0

CTRL+X and Y to save the file

then

sudo chmod +x /bin/certbotrenew.sh

then sudo crontab -e

00 20 * * * /bin/certbotrenew.sh

This will run the renew script daily

00 20 * * 1 /bin/certbotrenew.sh

or this above will run the renewals every Monday


#4

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