fixed code indent problem

This commit is contained in:
Asif Bacchus 2019-01-08 02:00:53 -07:00
parent 02489e6813
commit 40595027fe

148
setup.sh
View File

@ -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