mirror of
https://github.com/go-acme/lego.git
synced 2024-11-29 01:42:09 +02:00
namesilo: add cleanup before add a DNS record (#1833)
This commit is contained in:
parent
4a14c315a2
commit
e76a104315
@ -98,6 +98,11 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
|
||||
return fmt.Errorf("namesilo: %w", err)
|
||||
}
|
||||
|
||||
err = d.CleanUp(domain, token, keyAuth)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = d.client.DnsAddRecord(&namesilo.DnsAddRecordParams{
|
||||
Domain: zoneName,
|
||||
Type: "TXT",
|
||||
@ -112,7 +117,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
|
||||
}
|
||||
|
||||
// CleanUp removes the TXT record matching the specified parameters.
|
||||
func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
|
||||
func (d *DNSProvider) CleanUp(domain, _, keyAuth string) error {
|
||||
fqdn, _ := dns01.GetRecord(domain, keyAuth)
|
||||
|
||||
zoneName, err := getZoneNameByDomain(fqdn)
|
||||
|
Loading…
Reference in New Issue
Block a user