added DH Parameters path section
This commit is contained in:
parent
01e248a14f
commit
f0008b1d71
67
setup.sh
67
setup.sh
@ -22,6 +22,7 @@ unset useCertbot
|
|||||||
unset CertbotDomain
|
unset CertbotDomain
|
||||||
unset CertPath
|
unset CertPath
|
||||||
unset KeyPath
|
unset KeyPath
|
||||||
|
unset DHPath
|
||||||
|
|
||||||
detectedIP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
|
detectedIP=$(ip route get 1 | sed -n 's/^.*src \([0-9.]*\) .*$/\1/p')
|
||||||
regexIP4="(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])"
|
regexIP4="(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])"
|
||||||
@ -188,7 +189,70 @@ while true; do
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo -e "${norm}"
|
;;
|
||||||
|
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
|
esac
|
||||||
done
|
done
|
||||||
@ -200,5 +264,6 @@ echo "Using Certbot: $useCertbot"
|
|||||||
echo "CertbotDomain: $CertbotDomain"
|
echo "CertbotDomain: $CertbotDomain"
|
||||||
echo "CertPath: $CertPath"
|
echo "CertPath: $CertPath"
|
||||||
echo "KeyPath: $KeyPath"
|
echo "KeyPath: $KeyPath"
|
||||||
|
echo "DHPath: $DHPath"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user