avoid downing non-existent iface
This commit is contained in:
parent
0165b7a504
commit
856150866e
|
@ -84,6 +84,9 @@ func (wg *wgState) writeConf(nodes []node) error {
|
|||
}
|
||||
|
||||
func (wg *wgState) downInterface() error {
|
||||
if err := exec.Command("wg", "show", wg.iface).Run(); err != nil {
|
||||
return nil // assume a failure means the interface is not there
|
||||
}
|
||||
return exec.Command("wg-quick", "down", wg.iface).Run()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue