diff options
Diffstat (limited to 'bin/mauveserver')
| -rwxr-xr-x[-rw-r--r--] | bin/mauveserver | 14 | 
1 files changed, 8 insertions, 6 deletions
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  | 
