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_rails | |
parent | 9c52f98c77ad5bbe97455f43f5d31bd5759d0685 (diff) | |
download | unicorn-0792b37d5e28d3ea1585d5837682cde4d0319a8a.tar.gz |
Diffstat (limited to 'bin/unicorn_rails')
-rwxr-xr-x | bin/unicorn_rails | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/unicorn_rails b/bin/unicorn_rails index 184056e..72ab288 100755 --- a/bin/unicorn_rails +++ b/bin/unicorn_rails @@ -5,8 +5,7 @@ require 'optparse' require 'fileutils' daemonize = false -listeners = [] -options = { :listeners => listeners } +options = { :listeners => [] } host, port = Unicorn::Const::DEFAULT_HOST, Unicorn::Const::DEFAULT_PORT set_listener = false ENV['RAILS_ENV'] ||= "development" @@ -70,7 +69,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| @@ -181,7 +180,7 @@ def rails_builder(ru, daemonize) end app = rails_builder(ru, daemonize) -listeners << "#{host}:#{port}" if set_listener +options[:listeners] << "#{host}:#{port}" if set_listener if $DEBUG require 'pp' |