automatic systemd NetworkManager service restart
authorFadeMind <redacted>
Fri, 29 Jan 2016 14:02:22 +0000 (15:02 +0100)
committerFadeMind <redacted>
Fri, 29 Jan 2016 14:02:22 +0000 (15:02 +0100)
updateHostsFile.py [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 7dea797..9b202c2
@@ -324,6 +324,9 @@ def moveHostsFileIntoPlace( finalFile ):
                        if os.path.isfile( "/etc/rc.d/init.d/nscd" ):
                                if( subprocess.call(["/usr/bin/sudo", "/etc/rc.d/init.d/nscd", "restart"] )):
                                        printFailure( "Flushing the DNS Cache failed." )
+                       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." )
        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