Created
April 3, 2017 05:20
-
-
Save elamperti/3d34a567ed099baef6b2f68583a565c0 to your computer and use it in GitHub Desktop.
Marlin's firmware DDNS update for Google Domains
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
#!/bin/sh | |
# (Copied from Marlin's examples) | |
# This script should be placed at /jffs/scripts/ddns-start | |
# chmod a+x ddns-start | |
# Finally set to custom in WAN -> DDNS. | |
# more info: https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS#google-domains | |
# Get the following login info from Google Domains' dashboard | |
U=??? | |
P=??? | |
D=your.domain | |
H=subdomain | |
google_dns_update() { | |
CMD=$(curl -s https://$1:[email protected]/nic/update?hostname=$4.$3) | |
logger "google-ddns-updated: $CMD" | |
case "$CMD" in | |
good*|nochg*) /sbin/ddns_custom_updated 1 ;; | |
abuse) /sbin/ddns_custom_updated 1 ;; | |
*) /sbin/ddns_custom_updated 0 ;; | |
esac | |
} | |
google_dns_update $U $P $D $H | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment