Sha256: 4550bdca4ce655109941111866b500364b31667f9e014df3aa4402c7cbc891c0
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
require 'trinidad' require 'trinidad_daemon_extension/jars' require 'trinidad_daemon_extension/tomcat_wrapper' require 'trinidad_daemon_extension/version' module Trinidad module Extensions class DaemonServerExtension < ServerExtension def configure(tomcat) Trinidad::Extensions::Daemon::TomcatWrapper.new(tomcat, pid_file, jvm_args) end def override_tomcat?; true; end def pid_file @options[:pid_file] end def jvm_args @options[:jvm_args] ? @options[:jvm_args].split : [] end end class DaemonOptionsExtension < OptionsExtension def configure(parser, default_options) message = 'run Trinidad as a daemon, PID_FILE defaults to ENV[TMPDIR]/trinidad.pid' parser.on('--daemonize', '--daemonize [PID_FILE]', message) do |pid| extensions = default_options[:extensions] || {} extensions[:daemon] = { :pid_file => pid } default_options[:extensions] = extensions end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
trinidad_daemon_extension-0.4.0 | lib/trinidad_daemon_extension.rb |