Skip to content

Instantly share code, notes, and snippets.

@lesstif
Last active October 23, 2019 03: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 lesstif/ff52a2793bd02ef2dcaef2fe439561c4 to your computer and use it in GitHub Desktop.
Save lesstif/ff52a2793bd02ef2dcaef2fe439561c4 to your computer and use it in GitHub Desktop.
nginx 를 위해 CA, Root CA 인증서를 SSL 인증서와 병합
#!/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