added certificate path section
This commit is contained in:
parent
70baf37abc
commit
b0db9bee5d
42
setup.sh
42
setup.sh
@ -111,10 +111,52 @@ if [ "${useCertbot}" -eq 1 ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
# not using Certbot: get location of certificate
|
||||
while true; do
|
||||
read -p "What is the path to your primary SSL certificate? " inputCertPath
|
||||
case $inputCertPath in
|
||||
'')
|
||||
echo -e "\n${err}You cannot have an empty path to your SSL certificate${norm}"
|
||||
;;
|
||||
[Xx]*)
|
||||
echo -e "\n${cyan}---exiting---\n${norm}"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
# validate path
|
||||
if [ -s "${inputCertPath}" ]; then
|
||||
CertPath="${inputCertPath}"
|
||||
break
|
||||
else
|
||||
echo -e "\n${warn}The file you specified doesn't exist or is empty"
|
||||
while true; do
|
||||
read -p "Do you want to use this path anyways? " yn
|
||||
echo -e "${norm}"
|
||||
case $yn in
|
||||
[Yy]*)
|
||||
CertPath="${inputCertPath}"
|
||||
break
|
||||
;;
|
||||
[Nn]*)
|
||||
break
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ -n "${CertPath}" ]; then
|
||||
break
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
# debug section
|
||||
echo "Local IP4: $IP4"
|
||||
echo "Using Certbot: $useCertbot"
|
||||
echo "CertbotDomain: $CertbotDomain"
|
||||
echo "CertPath: $CertPath"
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user