From 4bc6ffc24c9a0e723540f777c944ac863535ef33 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 4 Jan 2019 22:57:14 -0700 Subject: [PATCH] updated certpath section to check for FILE specifically --- setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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}"