diff --git a/cfddns.sh b/cfddns.sh index 50af580..e7df06c 100755 --- a/cfddns.sh +++ b/cfddns.sh @@ -50,10 +50,14 @@ if [ -z "$accountFile" ] || [[ $accountFile == -* ]]; then echo -e "\e[1;31mNo file containing account details was specified." echo -e "\e[0;31m(-f parameter empty or missing)\e[0m" exit 101 +elif [ ! -s "$accountFile" ]; then + echo -e "\e[1;31mAccount details file is either empty or does not" \ + "exist.\e[0m" + exit 102 elif [ -z ${dnsRecords} ]; then echo -e "\e[1;31mNo DNS records were specified." echo -e "\e[0;31m(-r parameter(s) empty or missing)\e[0m" - exit 102 + exit 103 fi