Skip to content

Instantly share code, notes, and snippets.

@rlaager
Created May 12, 2019 19:57
Show Gist options
  • Save rlaager/1345b5dae5d43e8aefd46bd702680962 to your computer and use it in GitHub Desktop.
Save rlaager/1345b5dae5d43e8aefd46bd702680962 to your computer and use it in GitHub Desktop.
A certbot deploy hook for znc
#!/bin/sh
# This script goes in: /etc/letsencrypt/renewal-hooks/deploy
for domain in $RENEWED_DOMAINS
do
if [ "$domain" = "$(hostname --fqdn)" ]
then
cat "$RENEWED_LINEAGE/privkey.pem" "$RENEWED_LINEAGE/fullchain.pem" > /var/lib/znc/znc.pem
systemctl reload znc
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment