I have installed letsencrypt on Ubuntu 14.03 following this guide:
I also created a cron job for certificate renewal as described in the guide, but then found the following problem:
certbot-auto renew(as a non-root user) and
sudo certbot-auto renewboth work when tested from the command line (certbot reports that the certificates are not due for renewal yet, as expected)
- However, when the same command is run by cron (as root), certbot tries to upgrade itself.
Any idea why I am getting this different behaviour? What is the difference between running the command manually on a shell console and having it run by cron?
Update: I added
--no-self-upgrade but it didn't make any difference. On further investigation I noticed the following:
sudo certbot-auto renew --dry-runworks fine
sudo su; certbot-auto renew --dry-runtries to upgrade certbot first
For some reason, certbot seems to think it is not properly installed when running in the second form.