Last active
October 23, 2019 03:06
-
-
Save lesstif/ff52a2793bd02ef2dcaef2fe439561c4 to your computer and use it in GitHub Desktop.
nginx 를 위해 CA, Root CA 인증서를 SSL 인증서와 병합
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 | |
if [ "$#" -lt 1 ]; then | |
echo "$# is Illegal number of parameters." | |
echo "Usage: $0 host_ssl_cert_path" | |
echo "Example: $0 /etc/pki/tls/certs/snake-oil.crt"; | |
exit 1 | |
fi | |
TARGET=$1 | |
echo ${TARGET} | |
## assume that ssl intermediate certs exist in the root user' home folder. | |
for f in ${HOME}/*.crt; do | |
cat "${f}" >> "${TARGET}"; | |
echo "" >> "${TARGET}"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment