Last active
April 4, 2019 17:00
-
-
Save psy0rz/6d67abad049cd57e6e33ef31abdb9409 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
### Automaticly update haproxy with letsencrypt/certbot certificates. | |
### Just create the files below in the hook-directories and certbot will use them. (no extra options needed, also works with certbot renew) | |
[root@proxy1 ~]# cat /etc/letsencrypt/renewal-hooks/deploy/haproxy | |
#!/bin/bash | |
set -e | |
NAME=`basename $RENEWED_LINEAGE` | |
cd $RENEWED_LINEAGE | |
cat fullchain.pem privkey.pem > $NAME.pem | |
mv $NAME.pem /etc/haproxy/certs/ | |
[root@proxy1 ~]# cat /etc/letsencrypt/renewal-hooks/post/haproxy | |
#!/bin/bash | |
systemctl reload haproxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment