Another hook test.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 4 Oct 2012 10:22:49 +0000 (06:22 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 4 Oct 2012 10:22:49 +0000 (06:22 -0400)
filter-test.py

index ae91127cb920b64de19d2259780325f0c6c06072..b5aaf77150860edc659f70cf5d3bd475cca29c46 100755 (executable)
@@ -24,7 +24,10 @@ ps = subprocess.Popen("ps -U %s uh" % os.getenv("LOGNAME"),
 data = ps.stdout.read()
 irkerd_count = len([x for x in data.split("\n") if x.find("irkerd") != -1])
 
-if not irkerd_count:
+if irkerd_count:
+    print "Using running irkerd..."
+else:
+    print "Launching new irkerd..."
     os.system("gnome-terminal --title 'irkerd' -e 'irkerd -d 2' &")
 
 time.sleep(0.1)        # Avoid a race condition