我正在尝试这样做:https ://www.shivering-isles.com/lets-encrypt-renew-all-your-certs-using-systemd/
当我运行计时器时:
sudo systemctl start letsencrypt.timer
我得到错误:
Job for letsencrypt.timerfailed. See "systemctl status letsencrypt.timer" and "journlctl -xe" for details.
sudo journalctl -u letsencrypt.timer
:
-- Logs begin at Sat 2017-02-25 05:28:36 UTC, end at Fri 2017-03-03 15:18:23
Mar 03 14:54:17 instanty-dev systemd[1]: letsencrypt.timer: Refusing to start
Mar 03 14:54:17 instanty-dev systemd[1]: Failed to start letsencrypt timer.
letsencrypt.service
:
[Unit]
Description=Renews letsencrypt certificates
After=network.target
[Service]
Type=oneshot
WorkingDirectory=/opt/letsencrypt/
ExecStart=/opt/letsencrypt/letsencrypt-auto renew
letsencrypt.timer
:
[Unit]
Description=letsencrypt timer
[Timer]
OnCalendar=daily
Persistent=true
Unit=letsencrypt.service
[Install]
WantedBy=basic.target
通过查看
systemd
源代码,计时器发出“拒绝启动”的唯一原因是它需要激活的服务单元是否存在问题。确认您的.timer
和.service
文件都有效:还要确认您可以手动启动letsencrypt服务: