diff options
-rw-r--r-- | .hgignore | 13 | ||||
-rw-r--r-- | debian/mauvealert-client.links | 2 | ||||
-rw-r--r-- | lib/mauve/notifiers/sms_aql.rb | 12 |
3 files changed, 18 insertions, 9 deletions
@@ -1,7 +1,8 @@ ~$ -test.log$ -test.db$ -test.conf$ -mauveserver.conf$ -alerts.db -.*.swp$ +^test\..*$ +^.*\.db +.*\.sw.$ +^debian/mauvealert-.*/ +^debian/mauvealert-.*\.debhelper(.log)?$ +^debian/mauvealert-.*.substvars$ +^debian/files diff --git a/debian/mauvealert-client.links b/debian/mauvealert-client.links new file mode 100644 index 0000000..9c829dd --- /dev/null +++ b/debian/mauvealert-client.links @@ -0,0 +1,2 @@ +usr/bin/mauveclient usr/bin/mauvesend + diff --git a/lib/mauve/notifiers/sms_aql.rb b/lib/mauve/notifiers/sms_aql.rb index 1cf8c04..c1c356b 100644 --- a/lib/mauve/notifiers/sms_aql.rb +++ b/lib/mauve/notifiers/sms_aql.rb @@ -57,9 +57,15 @@ module Mauve "" end - txt += "#{alert.update_type.upcase}: " - txt += alert.summary_one_line - + template_file = File.join(File.dirname(__FILE__),"templates","sms.txt.erb") + + txt += if File.exists?(template_file) + ERB.new(File.read(template_file)).result(binding).chomp + else + logger.error("Could not find sms.txt.erb template") + alert.to_s + end + others = all_alerts-[alert] if !others.empty? txt += (1 == others.length)? |