Created
February 21, 2020 20:24
-
-
Save calebhailey/552ce595028e7e83a0e54c42ebe67b40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
# Google Domains Dynamic DNS Updater Script | |
# See: https://support.google.com/domains/answer/6147083?hl=en | |
DDNS_USERNAME=xxxxxxxxxxxxxxxx | |
DDNS_PASSWORD=xxxxxxxxxxxxxxxx | |
DDNS_HOSTNAME=foo.yourcompany.com | |
DDNS_IPADDRESS=$(curl -s http://checkip.amazonaws.com) | |
DDNS_STATUS=$(curl -s -XPOST "https://${DDNS_USERNAME}:${DDNS_PASSWORD}@domains.google.com/nic/update?hostname=${DDNS_HOSTNAME}&myip=${DDNS_IPADDRESS}") | |
echo "$(date) ${DDNS_STATUS}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment