CarlEdman / godaddy-ddns

A script for dynamically updating a GoDaddy DNS record. I use GoDaddy to host DNS for a domain and I wanted to point an A record in that domain to a host who's IP address changes occasionally. GoDaddy has an API to do this, so this happened. Cf. thatjpk/cloudflare-ddns.
The Unlicense
198 stars 61 forks source link

Handling "origin" record #2

Closed NP-Hardass closed 7 years ago

NP-Hardass commented 7 years ago

The "name" field can be "@" which means the root origin, however the program currently enforces HOST.DOMAIN.TOP and interprets @ for file paths.

Unfortunately, I suspect handling it would require a pretty thorough rewrite, but I figured I'd point it out.

dhowdy commented 7 years ago

I just ran in to this issue as well. I'm writing a patch and will submit a pull request.

dhowdy commented 7 years ago

Patch submitted via pull request. Essentially it's just substituting "%" for "@" so you can update your root DNS zone. Like "@.domain.tld".

Bash/sh doesn't have an issue with it, but it's possible that other shells could. I've tested this on a 16.04 system and my ASUS router running Merlin and Entware (with python3 running off of a USB drive.) Both the command line and file updates work as expected.

CarlEdman commented 7 years ago

Sorry about the delay. All fixed up now.