summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.homeunix.net>2009-07-09 21:59:44 -0400
committerScott Ullrich <sullrich@pfsense.homeunix.net>2009-07-09 21:59:44 -0400
commite98419d8f600d48333c1e1ca7a2433084d99a047 (patch)
treed00367aaaee653fc5a319fbb7a27867f98f0b926 /etc/inc/pfsense-utils.inc
parent8c73ff0c5131626deac9b443c6e9aa9bf8c4ee9f (diff)
downloadpfsense-e98419d8f600d48333c1e1ca7a2433084d99a047.zip
pfsense-e98419d8f600d48333c1e1ca7a2433084d99a047.tar.gz
Adding register_via_growl()
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc21
1 files changed, 19 insertions, 2 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index faa746c..e94fa10 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1681,10 +1681,27 @@ function notify_via_growl($message) {
$growl_password = $config['notifications']['growl']['password'];
if($growl_ip) {
$growl = new Growl($growl_ip, $growl_password);
- $growl->register();
$growl->notify("pfSense growl alert", "pfSense", "{$message}");
}
- return true; // XXX: check for error?
+}
+
+/****f* pfsense-utils/register_via_growl
+ * NAME
+ * register_via_growl
+ * INPUTS
+ * none
+ * RESULT
+ * none
+ ******/
+function register_via_growl() {
+ require_once("growl.class");
+ global $config;
+ $growl_ip = $config['notifications']['growl']['ipaddress'];
+ $growl_password = $config['notifications']['growl']['password'];
+ if($growl_ip) {
+ $growl = new Growl($growl_ip, $growl_password);
+ $growl->register();
+ }
}
?> \ No newline at end of file
OpenPOWER on IntegriCloud