diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-04-08 17:37:42 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-04-08 17:37:42 -0700 |
commit | 0792b37d5e28d3ea1585d5837682cde4d0319a8a (patch) | |
tree | a37b8de60b7fdcee8e8cb33983215803abe94107 /bin/unicorn | |
parent | 9c52f98c77ad5bbe97455f43f5d31bd5759d0685 (diff) | |
download | unicorn-0792b37d5e28d3ea1585d5837682cde4d0319a8a.tar.gz |
Diffstat (limited to 'bin/unicorn')
-rwxr-xr-x | bin/unicorn | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/unicorn b/bin/unicorn index 658d27c..beece97 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -5,8 +5,7 @@ require 'optparse' ENV["RACK_ENV"] ||= "development" daemonize = false -listeners = [] -options = { :listeners => listeners } +options = { :listeners => [] } host, port = Unicorn::Const::DEFAULT_HOST, Unicorn::Const::DEFAULT_PORT set_listener = false @@ -81,7 +80,7 @@ opts = OptionParser.new("", 24, ' ') do |opts| "listen on HOST:PORT or PATH", "this may be specified multiple times", "(default: #{Unicorn::Const::DEFAULT_LISTEN})") do |address| - listeners << address + options[:listeners] << address end opts.on("-c", "--config-file FILE", "Unicorn-specific config file") do |f| @@ -112,7 +111,7 @@ ru = ARGV[0] || "config.ru" abort "configuration file #{ru} not found" unless File.exist?(ru) app = Unicorn.builder(ru, opts) -listeners << "#{host}:#{port}" if set_listener +options[:listeners] << "#{host}:#{port}" if set_listener if $DEBUG require 'pp' |