-
-
Save dasJ/e42471969f6e5c70188b470c5bc3c884 to your computer and use it in GitHub Desktop.
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
{ | |
deployHook = '' | |
needsUpdate() { | |
[ -f "''${2}" ] || return 0 | |
[ "$(sha512sum "''${2}")" = "$(sha512sum "/var/lib/acme/live/''${1}/fullchain.pem")" ] || return 0 | |
return 1 | |
} | |
${concatStringsSep "\n" (attrValues cfg.hooks)} | |
''; | |
# Use like this: | |
helsinki.acme.hooks.znc = '' | |
mkdir -p /var/lib/secrets/znc | |
if needsUpdate efcloud.co /var/lib/znc/znc.pem; then | |
cat /var/lib/acme/live/efcloud.co/{fullchain,privkey}.pem /var/lib/secrets/znc/dhparam.pem > /var/lib/znc/znc.pem | |
systemctl restart znc | |
fi | |
''; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment