updated certpath section to check for FILE specifically

This commit is contained in:
Asif Bacchus 2019-01-04 22:57:14 -07:00
parent 7a6c6a9ac4
commit 4bc6ffc24c

View File

@ -115,7 +115,7 @@ 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
case "${inputCertPath}" in
'')
echo -e "\n${err}You cannot have an empty path to your SSL certificate${norm}"
;;
@ -125,11 +125,11 @@ while true; do
;;
*)
# validate path
if [ -s "${inputCertPath}" ]; then
if [ -f "${inputCertPath}" ]; then
CertPath="${inputCertPath}"
break
else
echo -e "\n${warn}The file you specified doesn't exist or is empty"
echo -e "\n${warn}The file you specified doesn't exist"
while true; do
read -p "Do you want to use this path anyways? " yn
echo -e "${norm}"