refactor: remove cfEmail

- authorized email not required by CF when using bearer token
This commit is contained in:
Asif Bacchus 2021-05-09 04:35:46 -06:00
parent f4f3c89e5e
commit 5569bbc535

View File

@ -370,14 +370,11 @@ case "$accountFile" in
. "./$accountFile" . "./$accountFile"
;; ;;
esac esac
# TODO: cfEmail is *not* required when using bearer tokens if [ -z "$cfKey" ]; then
if [ -z "$cfEmail" ]; then
printf "%sERROR%s\n" "$err" "$norm" >>"$logFile"
exitError 20
elif [ -z "$cfKey" ]; then
printf "%sERROR%s\n" "$err" "$norm" >>"$logFile" printf "%sERROR%s\n" "$err" "$norm" >>"$logFile"
exitError 21 exitError 21
elif [ -z "$cfZoneId" ]; then fi
if [ -z "$cfZoneId" ]; then
printf "%sERROR%s\n" "$err" "$norm" >>"$logFile" printf "%sERROR%s\n" "$err" "$norm" >>"$logFile"
exitError 22 exitError 22
fi fi
@ -488,7 +485,6 @@ fi
# 2: cannot find or access required external program(s) # 2: cannot find or access required external program(s)
# 3: curl error (probably connection) # 3: curl error (probably connection)
# 10: cannot auto-detect IP address # 10: cannot auto-detect IP address
# 20: accountFile has a null or missing cfEmail variable
# 21: accountFile has a null or missing cfKey variable # 21: accountFile has a null or missing cfKey variable
# 22: accountFile has a null or missing cfZoneId variable # 22: accountFile has a null or missing cfZoneId variable
# 25: Cloudflare API error # 25: Cloudflare API error