Skip to content

Instantly share code, notes, and snippets.

@homerquan
Last active September 8, 2016 05:40
Show Gist options
  • Select an option

  • Save homerquan/08aacc86e4ce797cf1dc24f36ec7a81e to your computer and use it in GitHub Desktop.

Select an option

Save homerquan/08aacc86e4ce797cf1dc24f36ec7a81e to your computer and use it in GitHub Desktop.
#!/bin/sh
MyGDomain=YOUR DOMAIN
Username=YOUR NAME
Password=YOUR PASS
CurrWANIP=$(wget http://ipinfo.io/ip -qO -)
echo "Google Domains DDNS: WAN IP Update into:$CurrWANIP"
curl -X POST -d hi@example.com -H "User-Agent: curl" -s https://$Username:$Password@domains.google.com/nic/update?hostname=$MyGDomain&myip=$CurrWANIP
echo "Google Domains DDNS: WAN IP update sent"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment