Skip to content

Instantly share code, notes, and snippets.

@theel0ja
Last active March 7, 2018 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theel0ja/838638fae279d1f90e19ec18e0410d98 to your computer and use it in GitHub Desktop.
Save theel0ja/838638fae279d1f90e19ec18e0410d98 to your computer and use it in GitHub Desktop.
HAproxy Let's Encrypt combiner
#!/usr/bin/env bash
# Combine function
combine() {
# move to the correct let's encrypt directory
cd /etc/letsencrypt/live/$SITE
# cat files to make combined .pem for haproxy
cat fullchain.pem privkey.pem > /etc/haproxy/certs/$SITE.pem
}
# Sites
SITE=nue01-de.theel0ja.info combine
# Reload HAProxy
sudo service haproxy reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment