Added check for empty or non-existant account details file

This commit is contained in:
Asif Bacchus 2018-09-12 00:16:26 -06:00
parent 91d1f71624
commit eeda084d67

View File

@ -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