From: Eric S. Raymond Date: Thu, 4 Oct 2012 10:22:49 +0000 (-0400) Subject: Another hook test. X-Git-Tag: 1.7~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e980c7075929a250791c2447e555ac02ee71618e;p=irker.git Another hook test. --- diff --git a/filter-test.py b/filter-test.py index ae91127..b5aaf77 100755 --- a/filter-test.py +++ b/filter-test.py @@ -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