Browse Source

zones: Machine.RemoveWireguardConfig()

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/1/head v0.4.2
Alejandro Mery 1 year ago
parent
commit
7ca01aa1e4
  1. 11
      pkg/zones/machine_rings.go

11
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
}

Loading…
Cancel
Save