diff --git a/wireguard.go b/wireguard.go index 041ba4a..3ef2b5c 100644 --- a/wireguard.go +++ b/wireguard.go @@ -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() }