Created
August 24, 2016 22:06
-
-
Save patrick246/80f1f4385514cc8b703913a226e7f599 to your computer and use it in GitHub Desktop.
Extracting fullchain certs from froxlor let's encrypt certificate
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 | |
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