|
|
@ -60,8 +60,9 @@ func updateDnsRecord(domain string, ip string, hmac string, keyname string, secr
|
|
|
|
|
|
|
|
|
|
|
|
update := fmt.Sprintf(`server %s
|
|
|
|
update := fmt.Sprintf(`server %s
|
|
|
|
key %s:%s %s
|
|
|
|
key %s:%s %s
|
|
|
|
|
|
|
|
update delete %s
|
|
|
|
update add %s %d a %s
|
|
|
|
update add %s %d a %s
|
|
|
|
send`, config.DnsServer, hmac, keyname, secret, domain, config.DnsTTL, ip)
|
|
|
|
send`, config.DnsServer, hmac, keyname, secret, domain, domain, config.DnsTTL, ip)
|
|
|
|
|
|
|
|
|
|
|
|
_, err = io.WriteString(f, update)
|
|
|
|
_, err = io.WriteString(f, update)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|