gpt4 book ai didi

cron - Certbot:打包的自动续订 cron 作业在哪里?

转载 作者:行者123 更新时间:2023-12-02 20:31:47 26 4
gpt4 key购买 nike

根据 Certbot documentation for Ubuntu 16.04和其他发行版,据说软件包中安装了一个 cron 作业,可以自动更新证书:

The Certbot packages on your system come with a cron job that will renew your certificates automatically before they expire. Since Let's Encrypt certificates last for 90 days, it's highly advisable to take advantage of this feature.

但是,我找不到有关此主题的任何相关文档,并且在遵循同一页面(版本 0.19.0)上的 certbot 安装说明后,我找不到在 crontab 上配置的任何 cron 作业。这个功能真的存在吗?如果是,如何找到并配置它?

注意:我在尝试使用钩子(Hook)配置自动续订时发现了这篇文档。我可以手动配置 cron 作业,但使用内置的自动更新功能似乎更合适。

最佳答案

在 Ubuntu 16.04(以及其他版本)中,自动更新由 systemd 而不是 cron 处理:

foo@localhost:~# systemctl list-timers
NEXT LEFT LAST PASSED UNIT ACTI
Fri 2018-05-25 19:05:59 UTC 1min 25s left n/a n/a systemd-tmpfiles-clean.timer syst
Sat 2018-05-26 00:56:58 UTC 5h 52min left Fri 2018-05-25 12:13:30 UTC 6h ago certbot.timer cert
Sat 2018-05-26 06:17:45 UTC 11h left Fri 2018-05-25 06:42:23 UTC 12h ago apt-daily-upgrade.timer apt-
Sat 2018-05-26 12:51:39 UTC 17h left Fri 2018-05-25 18:51:08 UTC 13min ago apt-daily.timer apt-

默认情况下,计时器每天触发两次。

foo@localhost:~# cat /lib/systemd/system/certbot.timer
[Unit]
Description=Run certbot twice daily

[Timer]
OnCalendar=*-*-* 00,12:00:00
RandomizedDelaySec=3600
Persistent=true

[Install]
WantedBy=timers.target

关于cron - Certbot:打包的自动续订 cron 作业在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48443791/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com