diff options
Diffstat (limited to 'bin/mauveconsole')
-rwxr-xr-x | bin/mauveconsole | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/mauveconsole b/bin/mauveconsole index c9a4656..d115642 100755 --- a/bin/mauveconsole +++ b/bin/mauveconsole @@ -64,8 +64,12 @@ puts "#{$0}: version "+Mauve::VERSION if version exit 0 if help or version or manual configuration_file = ARGV.shift -configuration_file = [".", "/etc/mauvealert/"].collect{|x| File.join("mauveserver.conf") }.find{|d| File.file?(d)} if configuration_file.nil? -configuration_file = File.expand_path(configuration_file) +configuration_file = [".", "/etc/mauvealert/"].collect{|x| File.join(x, "mauveserver.conf") }.find{|d| File.file?(d)} if configuration_file.nil? +configuration_file = File.expand_path(configuration_file) unless configuration_file.nil? + +if configuration_file.nil? + error "No configuration file could be found\n" +end unless File.file?(configuration_file) error "Configuration file #{configuration_file} not found\n" |