Sha256: 66d8c28fd5d14a486776d2d73c1c43bdc7233a6bf47c5ec9959a7dd394263732
Contents?: true
Size: 856 Bytes
Versions: 5
Compression:
Stored size: 856 Bytes
Contents
#!/usr/bin/env ruby libdir = File.dirname(__FILE__) + "/../lib" libdir = File.expand_path(libdir) $: << libdir require 'pcapr_local' require 'optparse' PcaprLocal::Config.assert_environment config_file = nil debug_mode = false opts = OptionParser.new do |opts| opts.banner = "Usage: #{$0} [-f config_file]" opts.on('-f', '--config_file FILE', 'Config file') do |f| config_file = f end opts.on('-d', '--debug_mode', 'Run in debug mode (server runs in foreground)') do debug_mode = true end opts.on_tail('-h', '--help', 'Show this message') do puts opts exit 0 end end opts.parse! config = PcaprLocal::Config.config config_file if debug_mode config["debug_mode"] = true # log to stdout config["log_dir"] = nil else config["debug_mode"] = false end PcaprLocal.start config
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
pcapr-local-0.2.0 | bin/startpcapr |
pcapr-local-0.1.13 | bin/startpcapr |
pcapr-local-0.1.12 | bin/startpcapr |
pcapr-local-0.1.11 | bin/startpcapr |
pcapr-local-0.1.10 | bin/startpcapr |