diff --git a/setup.sh b/setup.sh index 163e7bd..5deb782 100644 --- a/setup.sh +++ b/setup.sh @@ -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}"