1
0
Fork 0
docker-easy-haproxy/assets/scripts/certbot_to_haproxy.sh
2022-08-15 00:34:45 +00:00

11 lines
369 B
Bash
Executable file

#!/bin/bash
# @todo
# Loop through all Let's Encrypt certificates
for CERTIFICATE in `find /etc/letsencrypt/live/* -type d`; do
CERTIFICATE=`basename $CERTIFICATE`
# Combine certificate and private key to single file
cat /etc/letsencrypt/live/$CERTIFICATE/fullchain.pem /etc/letsencrypt/live/$CERTIFICATE/privkey.pem > /etc/haproxy/certs/$CERTIFICATE.pem
done