Signed-off-by: Alejandro Mery <amery@jpi.io>
@ -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