Skip to content

Instantly share code, notes, and snippets.

@patrick246
Created August 24, 2016 22:06
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 patrick246/80f1f4385514cc8b703913a226e7f599 to your computer and use it in GitHub Desktop.
Save patrick246/80f1f4385514cc8b703913a226e7f599 to your computer and use it in GitHub Desktop.
Extracting fullchain certs from froxlor let's encrypt certificate
#!/bin/bash
certDir="/etc/ssl/froxlor-custom"
cd $certDir
for entry in "$certDir"/*.crt
do
filename=$(basename "$entry")
certName="${filename%.*}"
fullchainName="${certName}_fullchain.pem"
cat $entry > "${fullchainName}"
cat "${certName}_chain.pem" >> "${fullchainName}"
cat "${certName}_CA.pem" >> "${fullchainName}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment