try some cleanup if iface setup failed

This commit is contained in:
Leo Antunes 2019-07-29 19:20:53 +02:00
parent c6e052c78f
commit 3a401a7942
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ func main() {
}
if err := wg.setUpInterface(nodes); err != nil {
logrus.Errorf("could not up interface: %s", err)
wg.downInterface()
}
if !config.NoEtcHosts {
if err := writeToEtcHosts(nodes); err != nil {