diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-08-23 14:30:38 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-08-23 14:30:38 -0400 |
commit | b21fc797fbb646e0a55868ae4bffe0cb060811a5 (patch) | |
tree | b17cdf641f793bb41c388820304c4df357a4b401 | |
parent | 80fc966b8ebd95ef811b994a3662f12e217fdbf3 (diff) | |
download | pfsense-b21fc797fbb646e0a55868ae4bffe0cb060811a5.zip pfsense-b21fc797fbb646e0a55868ae4bffe0cb060811a5.tar.gz |
Move growl related functions to notices.inc
-rw-r--r-- | etc/inc/notices.inc | 38 | ||||
-rw-r--r-- | etc/inc/pfsense-utils.inc | 40 |
2 files changed, 39 insertions, 39 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc index c2722b2..2f8e5fa 100644 --- a/etc/inc/notices.inc +++ b/etc/inc/notices.inc @@ -190,4 +190,42 @@ function are_notices_pending($category = "all") { 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_ip = $config['notifications']['growl']['ipaddress']; + $growl_password = $config['notifications']['growl']['password']; + if($growl_ip) { + $growl = new Growl($growl_ip, $growl_password); + $growl->notify("pfSense growl alert", "pfSense", "{$message}"); + } +} + +/****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 diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 42781d8..2c1e160 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1668,47 +1668,9 @@ 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_ip = $config['notifications']['growl']['ipaddress']; - $growl_password = $config['notifications']['growl']['password']; - if($growl_ip) { - $growl = new Growl($growl_ip, $growl_password); - $growl->notify("pfSense growl alert", "pfSense", "{$message}"); - } -} - -/****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(); - } -} - function get_freebsd_version() { $version = trim(`/usr/bin/uname -r | /usr/bin/cut -d'.' -f1`); return $version; } -?> +?>
\ No newline at end of file |