From: Tomasz PrzybyƂ Date: Mon, 15 Feb 2016 18:21:23 +0000 (+0100) Subject: Automatically restart wicd service rule X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=3a2cee341f662ea98474a9145992c2fc58de679f;p=stevenblack-hosts.git Automatically restart wicd service rule @StevenBlack Regards --- diff --git a/updateHostsFile.py b/updateHostsFile.py index 308f4704b..57cc7af01 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -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")