aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-07-11 15:25:20 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-07-11 15:25:20 +0100
commitd28af4ec946c6aa4b645b73cef47d7e0c680bc0d (patch)
treea4bd08c76a80f104b959382cf4b7f107c3b83b54 /bin
parent602cfd91a32eb8ce16792ae1dd5582cba01a1a38 (diff)
Removed old java stuff
Diffstat (limited to 'bin')
-rwxr-xr-xbin/jconsole23
-rwxr-xr-xbin/jmauveserver65
2 files changed, 0 insertions, 88 deletions
diff --git a/bin/jconsole b/bin/jconsole
deleted file mode 100755
index 6e638ad..0000000
--- a/bin/jconsole
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env jruby
-
-require 'pp'
-pp $:
-
-Thread.abort_on_exception = true
-require 'irb'
-require 'thread'
-
-# hack for delving into test-generated configurations
-class AlertAndNotificationLogic; Alerts = Queue.new; end
-
-require 'mauve/configuration'
-include Mauve
-#raise "must specify config file" unless ARGV.length > 0
-unless ARGV.length > 0
- STDERR.print("You must specify a configuration file as $arg[1]\n")
- STDERR.print(" eg: ./mauve_starter ./bin/console ./test/local.conf\n")
- exit 1
-end
-Configuration.current = ConfigurationBuilder.load(ARGV.shift)
-IRB.start
-
diff --git a/bin/jmauveserver b/bin/jmauveserver
deleted file mode 100755
index 9cdd26f..0000000
--- a/bin/jmauveserver
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env jruby
-
-begin
- eval "Proc.new { |a,&b| }"
-rescue SyntaxError => no_blocks_with_procs
- STDERR.print "mauveserver must have Ruby 1.8.7 or later, sorry (if you "+
- "try, you'll get a SyntaxError trying to load one of its libraries)\n"
- exit 1
-end
-
-require 'mauve/configuration'
-include Mauve
-
-configuration_file = ARGV[0]
-if !configuration_file
- if File.exists?("/etc/mauvealert/mauveserver.conf")
- configuration_file = "/etc/mauvealert/mauveserver.conf"
- else
- STDERR.print "Syntax: #{$0} <configuration filename>\n"
- exit 1
- end
-end
-Configuration.current = ConfigurationBuilder.load(configuration_file)
-
-class RestartSignalReceived < Exception; end
-trap("HUP") do
- # this blows up if you do it twice in quick succession, but don't really
- # care about that case as it's only for log rotation.
- Thread.main.raise(RestartSignalReceived.new)
-end
-
-# Start canary thread.
-#require 'canary'
-#Canary.start(1, Log)
-
-# Main loop
-@logger = Log4r::Logger.new "mauve::server<#{Process.pid}>"
-loop do
- begin
- Configuration.current.server.run
- rescue Interrupt
- @logger.info "Interrupted by user, exiting"
- Configuration.current.close
- exit 0
- rescue RestartSignalReceived => ex
- @logger.info "Restart signal received, reloading the configuration"
- begin
- new_configuration = ConfigurationBuilder.load(configuration_file)
- rescue Exception => ex
- @logger.error "Error reloading configuration, reusing old one: #{ex}"
- @logger.debug ex.backtrace.join("\n")
- end
-
- Configuration.current.close
- Configuration.current = new_configuration
- rescue Exception => ex
- @logger.fatal("Uncaught #{ex.class} exception, will try to log")
- @logger.fatal("Class: #{ex.class} "+
- "Message: #{ex.message} "+
- "Backtrace: #{ex.backtrace.join("\n")}")
- exit 9
- end
-end
-
-