From e980c7075929a250791c2447e555ac02ee71618e Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 4 Oct 2012 06:22:49 -0400 Subject: [PATCH] Another hook test. --- filter-test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.26.2