summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.homeunix.net>2009-07-09 19:07:59 -0400
committerScott Ullrich <sullrich@pfsense.homeunix.net>2009-07-09 19:07:59 -0400
commitcaee65e326c781696c3bac5d347578f830b0fb5e (patch)
treedbce77e0f9e56d7d0d3074eec2379112977b5c51 /etc/inc
parentfacd2d76602df467b10b08dc0681d9ca56e22f49 (diff)
downloadpfsense-caee65e326c781696c3bac5d347578f830b0fb5e.zip
pfsense-caee65e326c781696c3bac5d347578f830b0fb5e.tar.gz
Adding notify_via_growl() function which assists in sending growl messages to your device. Will be used to alert important things such as wan down, wan high latency, etc.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc21
1 files changed, 20 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 24e478e..f6669c9 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1666,4 +1666,23 @@ function isvm() {
return false;
}
-?>
+/****f* pfsense-utils/notify_via_growl
+ * NAME
+ * notify_via_growl
+ * INPUTS
+ * notification string to send
+ * RESULT
+ * returns true if message was sent
+ ******/
+function notify_via_growl($message) {
+ require_once("growl.class");
+ global $config;
+ $growl_settings = &$config['notifications']['growl'];
+ $growl_ip = $growl_settings['ipaddress'];
+ $growl_password = $growl_settings['password'];
+ $growl = new Growl($growl_ip, $growl_password);
+ $growl->register();
+ $growl->notify("pfSense growl alert", "", "{$message}");
+}
+
+?> \ No newline at end of file
OpenPOWER on IntegriCloud