Created
May 18, 2017 21:10
-
-
Save fb64/2697242cd5224287e52f6837001b35a5 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
#!/bin/bash | |
#run certbot to renew certificate | |
certbot renew --pre-hook "service haproxy stop" --post-hook "service haproxy start" | |
#update certificate file for haproxy | |
DOMAIN='your-domain.com' sudo -E bash -c 'cat /etc/letsencrypt/live/$DOMAIN/fullchain.pem /etc/letsencrypt/live/$DOMAIN/privkey.pem > /etc/haproxy/certs/$DOMAIN.pem' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment