Commit 97d9abfd authored by Yuanle Song's avatar Yuanle Song
Browse files

bugfix: when comparing HTTP_RESPONSE, should use the first word.

bugfix: nochg is changed from err to log. I think it's OK to get nochg right
after a update.

added doc in README.
parent c2b656d4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -39,3 +39,9 @@ it does not report errors.
  move username, password, domain name, update URL to $HOME/.ddclient-httprc

  then source that at run time.

* TODO BUG when I just updated my domain.
  I do a dig, I get the old IP. I try a new update. I get "nochg".
  will I be blocked?

  extend crontab gap to 3 minutes?
+3 −2
Original line number Diff line number Diff line
@@ -82,10 +82,11 @@ do_update() {
	fi

	# check HTTP_RESPONSE
	case "$HTTP_RESPONSE" in
	KEYWORD=`echo $HTTP_RESPONSE|cut -d' ' -f1`
	case "$KEYWORD" in
		good) log "good: update accepted."
			return 0 ;;
		nochg) err "nochg: IP not changed." ;;
		nochg) log "nochg: IP not changed." ;;
		badauth) err "badauth: user or password incorrect." ;;
		abuse) err "abuse: hostname is blocked for update abuse." ;;
		dnserr) err "dnserr: DNS error encountered." ;;