about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--Documentation/unicorn.1.txt5
-rwxr-xr-xbin/unicorn6
-rwxr-xr-xbin/unicorn_rails7
3 files changed, 8 insertions, 10 deletions
diff --git a/Documentation/unicorn.1.txt b/Documentation/unicorn.1.txt
index a8fa3ac..f3b560a 100644
--- a/Documentation/unicorn.1.txt
+++ b/Documentation/unicorn.1.txt
@@ -93,11 +93,6 @@ with rackup(1) but strongly discouraged.
     This option only exists for compatibility with the rackup(1) command,
     use of "-l"/"\--listen" switch is recommended instead.
 
--P, \--pid FILE
-:   Store the Process ID of the Unicorn master process.
-    This option only exists for compatibility with the rackup(1) command,
-    use of the "pid" directive in *CONFIG_FILE* is recommended.
-
 -s, \--server *SERVER*
 :   No-op, this exists only for compatibility with rackup(1).
 
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
 
diff --git a/bin/unicorn_rails b/bin/unicorn_rails
index cbf8861..e1df3ce 100755
--- a/bin/unicorn_rails
+++ b/bin/unicorn_rails
@@ -79,8 +79,9 @@ opts = OptionParser.new("", 24, '  ') do |opts|
     options[:config_file] = File.expand_path(f)
   end
 
-  opts.on("-P", "--path PATH", "Runs Rails app mounted at a specific path.",
-          "(default: /)") do |v|
+  opts.on("-P", "--path PATH", "DEPRECATED") do |v|
+    warn %q{Use of --path/-P is strongly discouraged}
+    warn %q{Use the 'map' directive in the rackup config instead}
     ENV['RAILS_RELATIVE_URL_ROOT'] = map_path = v
   end
 
@@ -92,7 +93,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