From e61d62b972a1fac37104b0af55f483683b9fa796 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 4 Jan 2019 23:40:05 -0700 Subject: [PATCH] added CAChainPath section --- setup.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/setup.sh b/setup.sh index 74ef720..dbd13e7 100644 --- a/setup.sh +++ b/setup.sh @@ -203,6 +203,46 @@ if [ "${useCertbot}" -eq 0 ]; then esac done + # not using Certbot: get location of CA Certificate Chain + while true; do + read -p "What is the path to your primary SSL CA Chain certificate? " inputCAChainPath + case "${inputCAChainPath}" in + '') + echo -e "\n${err}You cannot have an empty path to your SSL CA Chain certificate${norm}" + ;; + [Xx]*) + echo -e "\n${cyan}---exiting---\n${norm}" + exit 1 + ;; + *) + # validate path + if [ -f "${inputCAChainPath}" ]; then + CAChainPath="${inputCAChainPath}" + break + else + echo -e "\n${warn}The file you specified doesn't exist${norm}" + while true; do + read -p "Do you want to use this path anyways? " yn + case $yn in + [Yy]*) + CAChainPath="${inputCAChainPath}" + break + ;; + [Nn]*) + break + ;; + *) + ;; + esac + done + if [ -n "${CAChainPath}" ]; then + break + fi + fi + ;; + esac + done + # dhparam: get location of DH Parameters file while true; do read -p "What is the path to your DH Parameters file? (default: /etc/ssl/certs/dhparam.pem) " inputDHPath @@ -274,6 +314,7 @@ echo "Using Certbot: $useCertbot" echo "CertbotDomain: $CertbotDomain" echo "CertPath: $CertPath" echo "KeyPath: $KeyPath" +echo "CA-Chain: $CAChainPath" echo "DHPath: $DHPath" exit 0