diff --git a/pkg/zones/machine_rings.go b/pkg/zones/machine_rings.go index f62aa5a..1e950e8 100644 --- a/pkg/zones/machine_rings.go +++ b/pkg/zones/machine_rings.go @@ -250,3 +250,14 @@ func (m *Machine) applyZoneNodeID(zoneID, nodeID int) error { return nil } + +// RemoveWireguardConfig deletes wgN.conf from the machine's +// config directory. +func (m *Machine) RemoveWireguardConfig(ring int) error { + err := m.RemoveFile("wg%v.conf", ring) + if os.IsNotExist(err) { + err = nil + } + + return err +}