Certbot hooks for etckeeper; place them in /etc/letsencrypt/renewal-hooks/(pre|post)/
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
#!/bin/sh -eu | |
# Run etckeeper after certificate renewal (by Bachsau) | |
if command -v etckeeper >/dev/null && etckeeper unclean; then | |
etckeeper commit "committing updates to certificate configuration files after renewal" | |
fi |
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
#!/bin/sh -eu | |
# Run etckeeper prior to certificate renewal (by Bachsau) | |
if command -v etckeeper >/dev/null && etckeeper unclean; then | |
etckeeper commit "saving uncommitted changes in /etc prior to certificate renewal" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: You need to .gitignore
/letsencrypt/.certbot.lock
, which only exists while Certbot is running. Also/letsencrypt/archive/
and/letsencrypt/live/
if you want to keep the certs and private keys out of the repository. I'm only versioning the renewal configuration files.