The question is: Is it passed on as an http header to the server?Not sure what it means but here is what I see if a add the command to a terminal session
> User-Agent: curl/7.21.7 (arm-unknown-linux-gnu) libcurl/7.21.7 OpenSSL/1.0.0r zlib/1.2.5
When running manually, the URL is: "https://username:password@domains.g...ostname=subdomain.yourdomain.com&myip=1.2.3.4". I have been working under the assumption that the script automatically appended the the "&myip=x.x.x.x" to the end when running.
Any luck getting something to work?When running manually, the URL is: "https://username[emoji14]assword@do...ostname=subdomain.yourdomain.com&myip=1.2.3.4". I have been working under the assumption that the script automatically appended the the "&myip=x.x.x.x" to the end when running.
How are you calling the google_dns_update function? If you are taking advantage of the passed WAN IP to ddns-start wouldn't the correct call be
google_dns_update ProvidedUserName ProvidedPassword $1
since the WAN IP is the first arg to ddns-start.
#!/bin/sh
set -u
# args: username password hostname
google_dns_update() {
case $(curl -s https://$2:$3@domains.google.com/nic/update?hostname=$4&myip=$1) in
good|nochg*) /sbin/ddns_custom_updated 1 ;;
*) /sbin/ddns_custom_updated 0 ;;
esac
}
google_dns_update ProvidedUserName ProvidedPassword Example.com
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!