aboutsummaryrefslogtreecommitdiff
path: root/bin/mauveconsole
blob: debe5af760e9518c77b688817a6b393793201fd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/ruby1.8

require 'pp'
require 'irb'
require 'thread'
require 'mauve/configuration'

Thread.abort_on_exception = true

configuration_file = ARGV.shift
configuration_file = [".", "/etc/mauvealert/"].find{|d| File.file?(File.join(d,"mauveserver.conf")) } if configuration_file.nil?
configuration_file = File.expand_path(configuration_file)

unless File.file?(configuration_file)
  STDERR.print "Configuration file #{configuration_file} not found"
  Kernel.exit 1
end

Mauve::Configuration.current = Mauve::ConfigurationBuilder.load(configuration_file)

include Mauve

IRB.start