diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-09-17 17:52:27 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-09-17 18:11:04 -0700 |
commit | 94029de6bd2b2ada38dfd6efc536a7a950b0a12f (patch) | |
tree | 56af9f5006637ba136d0d054781d57b21fc1dee2 /bin/unicorn | |
parent | 577f2f88748221a8fd14eea5e72c7299c7b1664a (diff) | |
download | unicorn-94029de6bd2b2ada38dfd6efc536a7a950b0a12f.tar.gz |
`unicorn` tries to mimic `rackup` on the command-line to ease adoption. `unicorn_rails` tries to be somewhat like `rackup` as well, but then also tries to be consistent with `script/server` resulting some amount of confusion with regard to the -P/(--path|--pid) switch. Outright removal of these switches will probably not happen any time soon because we have command-lines inherited across processes, but we can stop advertising them. Since our (Unicorn) config file format is fortunately consistent between Rails and !Rails, recommend the "pid" directive be used instead. User interfaces are really, really tough to get right...
Diffstat (limited to 'bin/unicorn')
-rwxr-xr-x | bin/unicorn | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/unicorn b/bin/unicorn index b636bf8..0fed11e 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -65,7 +65,9 @@ opts = OptionParser.new("", 24, ' ') do |opts| daemonize = d ? true : false end - opts.on("-P", "--pid FILE", "file to store PID (default: none)") do |f| + opts.on("-P", "--pid FILE", "DEPRECATED") do |f| + warn %q{Use of --pid/-P is strongly discouraged} + warn %q{Use the 'pid' directive in the Unicorn config file instead} options[:pid] = File.expand_path(f) end @@ -94,7 +96,7 @@ opts = OptionParser.new("", 24, ' ') do |opts| opts.separator "Common options:" opts.on_tail("-h", "--help", "Show this message") do - puts opts + puts opts.to_s.gsub(/^.*DEPRECATED.*$/s, '') exit end |