Problem:
Is it possible that the current snap-based certbot install is not correctly detecting systemd and correctly configuring the twice-daily run?
After upgrading from Ubuntu 20.04, using the snap-based install, the configuration of the twice-daily run of certbot is done via crontab not systemd, and that the cron job carefully checks for systemd, and since it is present, does no work.
(Additionally, the published documentation needs to be updated about the shift to snap. I have Ubuntu 20.04 instructions need update. ppa is deprecated. install.html says use ppa, not snap. · Issue #8832 · certbot/certbot · GitHub open about that.)
After doing the snap-based installed, I expected, that the twice-daily run of certbot would be done with configuration in /etc/systemd/system/
No certbot files are present in that directory.
Instead I find /etc/cron.d/certbot with the line:
0 */12 * * * root test -x /usr/bin/certbot -a ! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew
This seems to test for systemd and if present does not run certbot.
I have confirmed that there is no apt-based certbot installed:
root@ubuntu-s-1vcpu-1gb-nyc1-01:~# apt-get remove certbot
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'certbot' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
My domain is:
poetnerd.com
I ran this command:
sudo snap install certbot --classi
It produced this output:
2021-05-05T18:21:26Z INFO Waiting for automatic snapd restart...
certbot 1.15.0 from Certbot Project (certbot-eff✓) installed
My web server is (include version):
nginx version: nginx/1.18.0 (Ubuntu)
The operating system my web server runs on is (include version):
Ubuntu 20.04
My hosting provider, if applicable, is:
Digital Ocean
I can login to a root shell on my machine (yes or no, or I don't know):
yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
no
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot):
certbot 1.15.0