zones: Machine.RemoveWireguardConfig()
Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
@@ -250,3 +250,14 @@ func (m *Machine) applyZoneNodeID(zoneID, nodeID int) error {
|
|||||||
|
|
||||||
return nil
|
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
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user