diff options
author | Steve Kemp <steve@steve.org.uk> | 2013-07-11 12:11:15 +0100 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2013-07-11 12:11:15 +0100 |
commit | f6f4a41b87160ca7fe3f6057ddc36e30a51ea72f (patch) | |
tree | 4b8246d750b3513ae6d7eecf15566d3ab0c4f676 | |
parent | 33b524063f0358a2366234576e4cb43712f454a8 (diff) |
Added new global variable "alert_source", for use with
mauve-notification.
-rw-r--r-- | etc/custodian/custodian.cfg | 9 | ||||
-rw-r--r-- | lib/custodian/settings.rb | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/etc/custodian/custodian.cfg b/etc/custodian/custodian.cfg index 2887bc7..3c38d41 100644 --- a/etc/custodian/custodian.cfg +++ b/etc/custodian/custodian.cfg @@ -27,6 +27,15 @@ ## +## +# Some alerts might have a source attribute to set +# currently only the mauive-alerter does, but that +# could change. +# +# alert_source = custodian.one-eyed-jack +# +## + ## # The target of the alert is alerter-specific. diff --git a/lib/custodian/settings.rb b/lib/custodian/settings.rb index f177083..2d4465d 100644 --- a/lib/custodian/settings.rb +++ b/lib/custodian/settings.rb @@ -181,6 +181,16 @@ module Custodian # + # The alert-source we send. Only used when the notifier is set to mauve. + # + def alert_source + _load() unless( _loaded? ) + + @settings['alert_source'] || "Custodian" + end + + + # # The target for the alert. # # When the alerter is "smtp" the target is the mail address. |