diff options
-rwxr-xr-x[-rw-r--r--] | bin/mauveconsole | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | bin/mauvesend | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | bin/mauveserver | 14 |
3 files changed, 8 insertions, 6 deletions
diff --git a/bin/mauveconsole b/bin/mauveconsole index 211eaab..211eaab 100644..100755 --- a/bin/mauveconsole +++ b/bin/mauveconsole diff --git a/bin/mauvesend b/bin/mauvesend index e96a8f1..e96a8f1 100644..100755 --- a/bin/mauvesend +++ b/bin/mauvesend diff --git a/bin/mauveserver b/bin/mauveserver index b0c3573..286b126 100644..100755 --- a/bin/mauveserver +++ b/bin/mauveserver @@ -1,4 +1,4 @@ -#! /usr/bin/ruby1.8 +#! /usr/bin/env ruby # NAME # mauveserver -- receive alerts from station(s) around the network # @@ -26,7 +26,7 @@ # The configuration file consists of various stanzas, and sub-stanzas which # give give options for each part of the server. The example configuration # file gives a definitive explanation of all the options. -# +# # SEE ALSO # mauveclient(1), mauveconsole(1) # @@ -94,6 +94,8 @@ outputter.formatter = Log4r::PatternFormatter.new( :pattern => "%d [ %6.6l ] [ % outputter.level = verbose ? Log4r::DEBUG : Log4r::INFO logger.outputters << outputter +$defout ||= $stdout # This isn't set in 1.9. + def error(msg) logger = Log4r::Logger['Mauve'] logger.error "*** Error: #{msg}" @@ -134,12 +136,12 @@ begin builder.include_file(configuration_file) Mauve::Configuration.current = builder.result rescue StandardError => ex - error ex + error ex end if test logger.info "*** Configuration looks OK!" - exit 0 + exit 0 end %w(HUP).each do |sig| @@ -147,7 +149,7 @@ end Mauve::Server.instance.logger.warn "#{sig} signal received. Restarting." Mauve::Server.instance.stop - # + # # Reload configuration # begin @@ -210,6 +212,6 @@ begin logger.info "This is mauve #{Mauve::VERSION}" Mauve::Server.instance.start rescue StandardError => ex - error ex + error ex end |