Only update A domains, since we're mapping to an IP.
This commit is contained in:
parent
429deee7d2
commit
ebc13d7f8b
2 changed files with 10 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue