style: change 'domain' to 'host'
terminology is more correct and less potentially confusing
This commit is contained in:
parent
3f9d164285
commit
31eb503245
10
cfddns.sh
10
cfddns.sh
@ -66,7 +66,7 @@ exitError() {
|
|||||||
errMsg="Cloudflare API error. Please review any 'CF-ERR:' lines in this log for details."
|
errMsg="Cloudflare API error. Please review any 'CF-ERR:' lines in this log for details."
|
||||||
;;
|
;;
|
||||||
26)
|
26)
|
||||||
errMsg="${failedDomainCount} domain update(s) failed. Any 'CF-ERR:' lines noted in this log may help determine what went wrong."
|
errMsg="${failedHostCount} host update(s) failed. Any 'CF-ERR:' lines noted in this log may help determine what went wrong."
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
printf "%s[%s] ERR: Unknown error. (code: 99)%s\n" "$err" "$(stamp)" "$norm" >>"$logFile"
|
printf "%s[%s] ERR: Unknown error. (code: 99)%s\n" "$err" "$(stamp)" "$norm" >>"$logFile"
|
||||||
@ -221,7 +221,7 @@ ip6=0
|
|||||||
ip4DetectionSvc="http://ipv4.icanhazip.com"
|
ip4DetectionSvc="http://ipv4.icanhazip.com"
|
||||||
ip6DetectionSvc="http://ipv6.icanhazip.com"
|
ip6DetectionSvc="http://ipv6.icanhazip.com"
|
||||||
invalidDomainCount=0
|
invalidDomainCount=0
|
||||||
failedDomainCount=0
|
failedHostCount=0
|
||||||
|
|
||||||
### process startup parameters
|
### process startup parameters
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
@ -483,15 +483,15 @@ while [ -n "$dnsRecordsToUpdate" ] && [ "$dnsRecordsToUpdate" != "$dnsSeparator"
|
|||||||
printf "%s[%s] ERR: Unable to update IP address for %s%s\n" "$err" "$(stamp)" "$record" "$norm" >>"$logFile"
|
printf "%s[%s] ERR: Unable to update IP address for %s%s\n" "$err" "$(stamp)" "$record" "$norm" >>"$logFile"
|
||||||
# do not exit with error, API error here is probably an update issue specific to this host
|
# do not exit with error, API error here is probably an update issue specific to this host
|
||||||
# increment counter and note it after all processing finished
|
# increment counter and note it after all processing finished
|
||||||
failedDomainCount=$((failedDomainCount + 1))
|
failedHostCount=$((failedHostCount + 1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# exit
|
# exit
|
||||||
if [ "$invalidDomainCount" -ne 0 ]; then
|
if [ "$invalidDomainCount" -ne 0 ]; then
|
||||||
printf "%s[%s] WARNING: %s invalid domain(s) were supplied for updating%s\n" "$warn" "$(stamp)" "$invalidDomainCount" "$norm" >>"$logFile"
|
printf "%s[%s] WARNING: %s invalid host(s) were supplied for updating%s\n" "$warn" "$(stamp)" "$invalidDomainCount" "$norm" >>"$logFile"
|
||||||
fi
|
fi
|
||||||
if [ "$failedDomainCount" -ne 0 ]; then
|
if [ "$failedHostCount" -ne 0 ]; then
|
||||||
exitError 26
|
exitError 26
|
||||||
else
|
else
|
||||||
exitOK
|
exitOK
|
||||||
|
Loading…
Reference in New Issue
Block a user