Use codemux condrestart.
authorDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 2 Dec 2008 03:44:13 +0000 (03:44 +0000)
committerDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Tue, 2 Dec 2008 03:44:13 +0000 (03:44 +0000)
plugins/codemux.py

index 7b11350..aad28b1 100644 (file)
@@ -118,13 +118,4 @@ def parseConf(conf = CODEMUXCONF):
 
 def restartService():
     logger.log("codemux:  Restarting codemux service")
-    os.system("/etc/init.d/codemux stop")
-    f = os.popen("/sbin/pidof codemux")
-    tmp = f.readlines()
-    f.close()
-    if len(tmp) > 0: 
-        pids = tmp[0].rstrip("\n").split()
-        for pid in pids:
-            logger.log("codemux:  Killing stalled pid %s" % pid, 2)
-            os.kill(pid, 9)
-    os.system("/etc/init.d/codemux start")
+    os.system("/etc/init.d/codemux condrestart")