【发布时间】:2018-09-13 17:02:36
【问题描述】:
我已经设置了 certbot 来更新 letencrypt 密钥。这行得通。
当我在 /etc/log/letsencrypt 检查我的日志时,我发现它每天运行两次。 午夜左右的某个地方,中午左右的某个地方。
我想每天早上只在某个地方运行一次。
为了控制 certbot 的运行,我从我的 cronjobs 中删除了所有条目。但没想到它仍然运行。
那么 certbot 是如何启动的呢?
额外信息:
当我运行一个脚本来显示所有 cronjobs 时,我得到了这个: (脚本:How do I list all cron jobs for all users?)
mi h d m w user command
0 3 * * 1 root /usr/bin/rsnapshot weekly
0 */4 * * * root /usr/bin/rsnapshot hourly
16 10 * * * root test -x /etc/cron.daily/popularity-contest && /etc/cron.daily/popularity-contest --crond
25 6 * * * root /etc/cron.daily/apache2
25 6 * * * root /etc/cron.daily/apt-compat
25 6 * * * root /etc/cron.daily/aptitude
25 6 * * * root /etc/cron.daily/automysqlbackup
25 6 * * * root /etc/cron.daily/bsdmainutils
25 6 * * * root /etc/cron.daily/dpkg
25 6 * * * root /etc/cron.daily/exim4-base
25 6 * * * root /etc/cron.daily/logrotate
25 6 * * * root /etc/cron.daily/man-db
25 6 * * * root /etc/cron.daily/mlocate
25 6 * * * root /etc/cron.daily/ntp
25 6 * * * root /etc/cron.daily/passwd
25 6 * * * root /etc/cron.daily/popularity-contest
25 6 * * * root /etc/cron.daily/tomcat8
30 2 1 * * root /usr/bin/rsnapshot monthly
30 3 * * * root /usr/bin/rsnapshot daily
47 6 * * 7 root /etc/cron.weekly/man-db
我从 certbot 中找到的文件是 /etc/cron.d 中的 certbot
它包含这一行:
#0 4 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(3600))' && certbot -q renew
我注释掉了(用#号)。
我的系统是debian:
Debian GNU/Linux 9
【问题讨论】:
标签: cron lets-encrypt certbot