Automatically restart wicd service rule
authorTomasz Przybył <redacted>
Mon, 15 Feb 2016 18:21:23 +0000 (19:21 +0100)
committerTomasz Przybył <redacted>
Mon, 15 Feb 2016 18:21:23 +0000 (19:21 +0100)
@StevenBlack

Regards

updateHostsFile.py

index 308f4704bbde9831ee6efe3b5ccf27598fcdeb62..57cc7af015a1896b1a7509d36233cbaa5a680075 100644 (file)
@@ -351,6 +351,9 @@ def moveHostsFileIntoPlace(finalFile):
             if os.path.isfile("/usr/lib/systemd/system/NetworkManager.service"):
                 if subprocess.call(["/usr/bin/sudo", "/usr/bin/systemctl", "restart", "NetworkManager.service"]):
                     printFailure("Flushing the DNS Cache failed.")
+            if os.path.isfile("/usr/lib/systemd/system/wicd.service"):
+                if subprocess.call(["/usr/bin/sudo", "/usr/bin/systemctl", "restart", "wicd.service"]):
+                    printFailure("Flushing the DNS Cache failed.")
     elif os.name == 'nt':
         print ("Automatically moving the hosts file in place is not yet supported.")
         print ("Please move the generated file to %SystemRoot%\system32\drivers\etc\hosts")
git clone https://git.99rst.org/PROJECT