Last active
April 7, 2023 08:02
-
-
Save Sen/4b6b45e14cfcf7aebdbba341133b0ca1 to your computer and use it in GitHub Desktop.
naive restart after Certbot cert updated
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /lib/systemd/system/certbot.service | |
[Unit] | |
Description=Certbot | |
Documentation=file:///usr/share/doc/python-certbot-doc/html/index.html | |
Documentation=https://letsencrypt.readthedocs.io/en/latest/ | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/certbot -q renew --post-hook "kill -9 $(ps -aef | grep "caddy" | grep -v grep | awk '{ print $2 }')" | |
PrivateTmp=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TZ=Asia/Shanghai | |
0 5 * * 1 certbot renew --post-hook "kill -9 $(ps -aef | grep "caddy" | grep -v grep | awk '{ print $2 }')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment