Systemd Certbot Apache Timer: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „=Service= */etc/systemd/system/certbot.service <pre> [Unit] Description=Let's Encrypt renewal [Service] Type=oneshot ExecStart=/usr/bin/certbot renew --pre-ho…“) |
Thomas (Diskussion | Beiträge) |
||
| (5 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 7: | Zeile 7: | ||
[Service] | [Service] | ||
Type=oneshot | Type=oneshot | ||
| − | ExecStart=/usr/bin/certbot renew --pre-hook "/bin/systemctl stop | + | ExecStart=/usr/bin/certbot renew --pre-hook "/bin/systemctl stop apache2.service" --post-hook "/bin/systemctl start apache2.service" --quiet --agree-tos |
</pre> | </pre> | ||
| + | |||
=Timer= | =Timer= | ||
*/etc/systemd/system/certbot.timer | */etc/systemd/system/certbot.timer | ||
| Zeile 23: | Zeile 24: | ||
WantedBy=timers.target | WantedBy=timers.target | ||
</pre> | </pre> | ||
| + | |||
| + | =Activate= | ||
| + | *systemctl daemon-reload | ||
| + | =Enable and start= | ||
| + | *systemctl start certbot.timer | ||
| + | |||
| + | =Renew when change timer settings= | ||
| + | systemctl reenable --now certbot.timer | ||
Aktuelle Version vom 27. Oktober 2017, 10:31 Uhr
Service
- /etc/systemd/system/certbot.service
[Unit] Description=Let's Encrypt renewal [Service] Type=oneshot ExecStart=/usr/bin/certbot renew --pre-hook "/bin/systemctl stop apache2.service" --post-hook "/bin/systemctl start apache2.service" --quiet --agree-tos
Timer
- /etc/systemd/system/certbot.timer
[Unit] Description=Twice daily renewal of Let's Encrypt's certificates [Timer] OnCalendar=0/12:00:00 RandomizedDelaySec=1h Persistent=true [Install] WantedBy=timers.target
Activate
- systemctl daemon-reload
Enable and start
- systemctl start certbot.timer
Renew when change timer settings
systemctl reenable --now certbot.timer