From 40595027fe1252b682ad57169e218c6e3d766100 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 8 Jan 2019 02:00:53 -0700 Subject: [PATCH] fixed code indent problem --- setup.sh | 148 +++++++++++++++++++++++++++---------------------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/setup.sh b/setup.sh index 1e10a56..35fec6a 100755 --- a/setup.sh +++ b/setup.sh @@ -453,85 +453,85 @@ fi # dhparam: get location of DH Parameters file if [ "${useSSL}" -eq 1 ]; then -echo -e "\n${mag}Having your own unique Diffie-Hellman Parameters file makes your SSL" -echo "communication more secure by pre-generating safe large prime and generator" -echo "numbers. You shouldn't use any pre-installed dhparam.pem files. You should" -echo "always generate your own." -echo -e "\nIf you haven't done that already and would like this script to do it for" -echo -e "you, please type ${warn}generate${mag} at the prompt instead of a path." -echo "Please note that although this process uses DSA-primes to speed things up" -echo "without sacrificing security, the process may still take up to 20+ minutes" -echo -e "depending on your hardware.${norm}\n" -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 + echo -e "\n${mag}Having your own unique Diffie-Hellman Parameters file makes your SSL" + echo "communication more secure by pre-generating safe large prime and generator" + echo "numbers. You shouldn't use any pre-installed dhparam.pem files. You should" + echo "always generate your own." + echo -e "\nIf you haven't done that already and would like this script to do it for" + echo -e "you, please type ${warn}generate${mag} at the prompt instead of a path." + echo "Please note that although this process uses DSA-primes to speed things up" + echo "without sacrificing security, the process may still take up to 20+ minutes" + echo -e "depending on your hardware.${norm}\n" + 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 - fi - ;; - [Xx]*) - echo -e "\n${cyan}---exiting---\n${norm}" - exit 1 - ;; - [Gg][Ee][Nn][Ee][Rr][Aa][Tt][Ee]*) - generateDH=1 - break - ;; - /*) - # validate path - if [ -f "${inputDHPath}" ]; then - DHPath="${inputDHPath}" + ;; + [Xx]*) + echo -e "\n${cyan}---exiting---\n${norm}" + exit 1 + ;; + [Gg][Ee][Nn][Ee][Rr][Aa][Tt][Ee]*) + generateDH=1 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 + ;; + /*) + # 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 - fi - ;; - *) - # path must be absolute and start with a slash - echo -e "\n${err}Path must be absolute not relative. Please re-enter starting with '/'${norm}" - ;; - esac -done + ;; + *) + # path must be absolute and start with a slash + echo -e "\n${err}Path must be absolute not relative. Please re-enter starting with '/'${norm}" + ;; + esac + done fi