fix: confirm creds exist if using default location

This commit is contained in:
Asif Bacchus 2021-05-08 03:50:58 -06:00
parent 7bc5f73e27
commit a060e72ea0
1 changed files with 4 additions and 0 deletions

View File

@ -277,6 +277,10 @@ if ! command -v jq >/dev/null; then
exit 2
fi
[ -z "$dnsRecords" ] && badParam errMsg "You must specify at least one DNS record to update. Exiting."
# verify credentials file exists and is not empty (default check)
if [ ! -f "$accountFile" ] || [ ! -s "$accountFile" ]; then
badParam errMsg "Cannot find CloudFlare credentials file (${accountFile}). Exiting."
fi
# turn off log file colourization if parameter is set
if [ "$colourizeLogFile" -eq 0 ]; then
bold=""