Which cronjob entry is correct? Should I remove one or does it need both?
0 */12 * * * root test -x /usr/bin/certbot -a ! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' &&
0 */12 * * * /bin/certbot renew && systemctl reload apache2
It definitely doesn't need two; It can all be done in one.
That said, I'd prefer replacing both with a mix of them.
sleep from the first and the
reload from the second.
As for the
certbot path, I'd check
which certbot to confirm that.
If I had to choose only one: Keep the first one.
[but make sure it actually runs]
If your Certbot is up to date enough (0.29.0 or newer), the sleep command in the cronjob isn't necessary any longer: Certbot will sleep itself when ran if it detects it's not being run from an interactive CLI.
That said, it's alsno no problem to have two delays, they're rather short.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.