From ebc13d7f8bac5d44e585bbc953b91c33a65a6463 Mon Sep 17 00:00:00 2001 From: Mike Cheng Date: Wed, 18 Jan 2017 18:54:55 -0500 Subject: [PATCH] Only update A domains, since we're mapping to an IP. --- README.md | 2 +- dyndns/daemon.go | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a6e52d6..20454ac 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Client that automatically updates name.com DNS records. Since name-dyndns has no external dependencies, you can get it simply by: ```go -go get github.com/mfycheng/name-dyndns.git +go get github.com/mfycheng/name-dyndns ``` ## Requirements diff --git a/dyndns/daemon.go b/dyndns/daemon.go index e1b727f..71130f7 100644 --- a/dyndns/daemon.go +++ b/dyndns/daemon.go @@ -4,11 +4,12 @@ package dyndns import ( "fmt" - "github.com/mfycheng/name-dyndns/api" - "github.com/mfycheng/name-dyndns/log" "strings" "sync" "time" + + "github.com/mfycheng/name-dyndns/api" + "github.com/mfycheng/name-dyndns/log" ) var wg sync.WaitGroup @@ -87,6 +88,12 @@ func runConfig(c api.Config, daemon bool) { continue } + // Only A records should be mapped to an IP. + // TODO: Support AAAA records. + if r.Type != "A" { + continue + } + log.Logger.Printf("Running update check for %s.", r.Name) if r.Content != ip { r.Content = ip