From 6cefafb63d52fb04ecde3624f8283163789f9827 Mon Sep 17 00:00:00 2001 From: James Gilliland Date: Thu, 30 May 2013 14:26:09 -0400 Subject: [PATCH] Update ircnotify.sh Avoid spawning ircnotify multiple times. --- bin/ircnotify.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/ircnotify.sh b/bin/ircnotify.sh index 2d1908e..d7fe78f 100755 --- a/bin/ircnotify.sh +++ b/bin/ircnotify.sh @@ -10,6 +10,9 @@ notify() fi } +# Avoid spawning script twice. +ps aux | grep ircnotify.sh | grep -v grep | grep -v $$ && exit + (ssh irc.walkah.net -o PermitLocalCommand=no \ ": > .irssi/fnotify ; tail -f .irssi/fnotify " | \ while read heading message; do \