fix: missing delete in nsupdate

master
phga 4 years ago
parent ce6a837924
commit 4291ea8b81

@ -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 {

Loading…
Cancel
Save