From ba90574464f7ab11b72d54f2085c92280c2c3258 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 30 Jul 2010 19:32:48 -0400 Subject: Adding script to allow sending messages to growl or email from normal shell scripts. Options are -e for email, -g for growl and -m 'message to send' --- etc/rc.notify_message | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 etc/rc.notify_message (limited to 'etc/rc.notify_message') diff --git a/etc/rc.notify_message b/etc/rc.notify_message new file mode 100755 index 0000000..a2c7d4b --- /dev/null +++ b/etc/rc.notify_message @@ -0,0 +1,38 @@ +#!/usr/local/bin/php + + $arg) { + switch($item) { + case "e": + $send_email = true; + break; + case "g": + $send_growl = true; + break; + case "m": + $message = $arg; + break; + } +} + +if($message) { + if($send_email) { + notify_via_smtp($message); + } + if($send_growl) { + notify_via_growl($message); + } +} + +?> \ No newline at end of file -- cgit v1.1