summaryrefslogtreecommitdiff
path: root/lib/custodian
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian')
-rw-r--r--lib/custodian/settings.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/custodian/settings.rb b/lib/custodian/settings.rb
index 09bf043..7d854f1 100644
--- a/lib/custodian/settings.rb
+++ b/lib/custodian/settings.rb
@@ -116,5 +116,35 @@ module Custodian
end
+ #
+ # The target for the alert.
+ #
+ # When the alerter is "file" the target is the mail address.
+ #
+ # When the alerter is "file" the target is the logfile.
+ #
+ # When the alerter is "mauve" the target is the destination for the
+ # alerts.
+ #
+ def alerter_target
+ _load() unless( _loaded? )
+
+ if ( @settings['alerter_target'] )
+ return( @settings['alerter_target'] )
+ end
+
+ case alerter()
+ when "smtp":
+ "root"
+ when "mauve":
+ "alert.bytemark.co.uk"
+ when "file":
+ "alerts.log"
+ else
+ nil
+ end
+ end
+
+
end
end