Added sqlDetails parameter check

This commit is contained in:
Asif Bacchus 2018-10-03 15:57:30 -06:00
parent 48d06eaa58
commit 3b72240d8c
2 changed files with 10 additions and 0 deletions

View File

@ -256,6 +256,16 @@ elif [ -n "$webUser" ]; then
fi
fi
## Ensure sqlDetails file exists
if [ ! -f "$sqlDetails" ]; then
echo -e "\n${err}The file containing your SQL details does not exist" \
"(-s parameter)${normal}\n"
exit 1
elif [ ! -s "$sqlDetails" ]; then
echo -e "\n${err}The file containing your SQL details is empty.${normal}\n"
exit 1
fi
### Log start of script operations
echo -e "\e[1;35m${stamp}-- Start $scriptName execution ---${normal}" \

0
sql.empty Normal file
View File