Sha256: d0db0836304e9615721bb474a7bcc590e9be3e14d0a17fb5855608d8b3f5c840
Contents?: true
Size: 976 Bytes
Versions: 1
Compression:
Stored size: 976 Bytes
Contents
require 'rubygems' gem 'trinidad_jars' require 'trinidad/extensions' require 'trinidad/jars' require File.expand_path('../../trinidad-libs/akuma', __FILE__) require File.expand_path('../../trinidad-libs/trinidad-daemon-extension', __FILE__) module Trinidad module Extensions module Daemon VERSION = '0.1.0' end class DaemonServerExtension < ServerExtension def configure(tomcat) org.jruby.trinidad.TrinidadDaemon.new(tomcat, @options[:pid_file]) end def override_tomcat?; true; end end class DaemonOptionsExtension < OptionsExtension def configure(parser, default_options) parser.on('-d', '--daemonize [PID_FILE]', 'run Trinidad as a daemon, pid_file by default is ENV[$TMPDIR]/trinidad.pid') 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.1.0 | lib/trinidad_daemon_extension.rb |