diff --git a/setup.sh b/setup.sh index 88aed7f..fdb951d 100644 --- a/setup.sh +++ b/setup.sh @@ -279,72 +279,73 @@ if [ "${useCertbot}" -eq 0 ]; then ;; 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 - case "${inputDHPath}" in - '') - # verify default path exists - inputDHPath="/etc/ssl/certs/dhparam.pem" - if [ -f "${inputDHPath}" ]; then - DHPath="${inputDHPath}" - 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]*) - DHPath="${inputDHPath}" - break - ;; - [Nn]*) - break - ;; - *) - ;; - esac - done - if [ -n "${DHPath}" ]; then - break - fi - fi - ;; - [Xx]*) - echo -e "\n${cyan}---exiting---\n${norm}" - exit 1 - ;; - *) - # validate path - if [ -f "${inputDHPath}" ]; then - DHPath="${inputDHPath}" - 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]*) - DHPath="${inputDHPath}" - break - ;; - [Nn]*) - break - ;; - *) - ;; - esac - done - if [ -n "${DHPath}" ]; then - break - fi - fi - ;; - esac - done fi +# 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 + case "${inputDHPath}" in + '') + # verify default path exists + inputDHPath="/etc/ssl/certs/dhparam.pem" + if [ -f "${inputDHPath}" ]; then + DHPath="${inputDHPath}" + 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]*) + DHPath="${inputDHPath}" + break + ;; + [Nn]*) + break + ;; + *) + ;; + esac + done + if [ -n "${DHPath}" ]; then + break + fi + fi + ;; + [Xx]*) + echo -e "\n${cyan}---exiting---\n${norm}" + exit 1 + ;; + *) + # validate path + if [ -f "${inputDHPath}" ]; then + DHPath="${inputDHPath}" + 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]*) + DHPath="${inputDHPath}" + break + ;; + [Nn]*) + break + ;; + *) + ;; + esac + done + if [ -n "${DHPath}" ]; then + break + fi + fi + ;; + esac +done + + # debug section echo "Local IP4: $IP4" echo "Using Certbot: $useCertbot"