Merge pull request #82 from FadeMind/patch-1

Automatically restart wicd service rule
This commit is contained in:
Steven Black
2016-02-15 15:07:55 -05:00
+3
View 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")