Permalink
Browse files

Kill off session on the irssi instance too.

  • Loading branch information...
jk0 committed Oct 17, 2011
1 parent ea566ca commit 1ce2a57d2d23e35020a76b85cd82ba3976db12c1
Showing with 27 additions and 1 deletion.
  1. +4 −0 README
  2. +22 −0 irssi-growl.sh
  3. +1 −1 notify.sh
View
4 README
@@ -26,3 +26,7 @@ Notifier Installation
- Set 'Hostname' to your irssi instance's host
- Set your irssi instance's username and host for LocalCommand
- Ensure the path to notify.sh is valid
+
+ vim ~/src/irssi-growl/notify.sh
+
+ - Ensure the path to irssi-growl.sh is valid
View
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Copyright 2011 Josh Kearney
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+ps ax | awk '{if($0 ~ /.irssi\/growl/ && $1 ~ /[0-9]+/ && $4 !~ /awk/) print $1}' |
+while read pid; do
+kill $pid
+done
+
+tail -f .irssi/growl
View
@@ -19,7 +19,7 @@ while read pid; do
kill $pid
done
-(ssh $1 -o PermitLocalCommand=no ": > .irssi/growl; tail -f .irssi/growl" |
+(ssh $1 -o PermitLocalCommand=no "~/src/irssi-growl/irssi-growl.sh" |
while read network message; do
growlnotify -t "${network}" -m "${message}";
done)&

0 comments on commit 1ce2a57

Please sign in to comment.