about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-05-20 02:56:30 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-05-20 02:56:30 +0000
commitef96cf124840fc9b0770a18ba13d6638fcdaa189 (patch)
tree839eab2bd7ceb37a27465a68b8e4b4459f4400b6 /bin
parent76f29c4aa2c010ab1e70ede2bcc585307e4e1d07 (diff)
downloadunicorn-ef96cf124840fc9b0770a18ba13d6638fcdaa189.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@190 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'bin')
-rw-r--r--bin/mongrel_rails32
1 files changed, 16 insertions, 16 deletions
diff --git a/bin/mongrel_rails b/bin/mongrel_rails
index 58fd615..36392af 100644
--- a/bin/mongrel_rails
+++ b/bin/mongrel_rails
@@ -37,7 +37,7 @@ class Start < GemPlugin::Plugin "/commands"
       ['-G', '--generate CONFIG', "Generate a config file for -C", :@generate, nil]
     ]
   end
-  
+
   def validate
     @cwd = File.expand_path(@cwd)
     valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd"
@@ -74,22 +74,22 @@ class Start < GemPlugin::Plugin "/commands"
       conf = YAML.load_file(@config_file)
       settings = conf.merge(settings)
     end
-    
+
     config = Mongrel::Rails::RailsConfigurator.new(settings) do
       log "Starting Mongrel in #{defaults[:environment]} mode at #{defaults[:host]}:#{defaults[:port]}"
-      
+
       if defaults[:daemon]
         log "Daemonizing, any open files are closed.  Look at #{defaults[:pid_file]} and #{defaults[:log_file]} for info."
         daemonize
       end
-      
+
       listener do
         mime = {}
         if defaults[:mime_map]
           log "Loading additional MIME types from #{defaults[:mime_map]}"
           mime = load_mime_map(defaults[:mime_map], mime)
         end
-        
+
         if defaults[:debug]
           log "Installing debugging prefixed filters.  Look in log/mongrel_debug for the files."
           debug "/"
@@ -135,7 +135,7 @@ def send_signal(signal, pid_file)
   rescue Errno::ESRCH
     puts "Process does not exist.  Not running."
   end
-  
+
   puts "Done."
 end
 
@@ -145,12 +145,12 @@ class Stop < GemPlugin::Plugin "/commands"
 
   def configure
     options [
-             ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd],
-             ['-f', '--force', "Force the shutdown.", :@force, false],
-             ['-P', '--pid FILE', "Where to write the PID", :@pid_file, "log/mongrel.pid"]
+      ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd],
+      ['-f', '--force', "Force the shutdown.", :@force, false],
+      ['-P', '--pid FILE', "Where to write the PID", :@pid_file, "log/mongrel.pid"]
     ]
   end
-  
+
   def validate
     @cwd = File.expand_path(@cwd)
     valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd"
@@ -161,7 +161,7 @@ class Stop < GemPlugin::Plugin "/commands"
     return @valid
   end
 
-  
+
   def run
     if @force
       send_signal("KILL", @pid_file)
@@ -178,12 +178,12 @@ class Restart < GemPlugin::Plugin "/commands"
 
   def configure
     options [
-             ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd],
-             ['-s', '--soft', "Do a soft restart rather than a process exit restart", :@soft, false],
-             ['-P', '--pid FILE', "Where to write the PID", :@pid_file, "log/mongrel.pid"]
+      ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd],
+      ['-s', '--soft', "Do a soft restart rather than a process exit restart", :@soft, false],
+      ['-P', '--pid FILE', "Where to write the PID", :@pid_file, "log/mongrel.pid"]
     ]
   end
-  
+
   def validate
     @cwd = File.expand_path(@cwd)
     valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd"
@@ -209,7 +209,7 @@ GemPlugin::Manager.instance.load "mongrel" => GemPlugin::INCLUDE, "rails" => Gem
 
 
 if not Mongrel::Command::Registry.instance.run ARGV
-   exit 1
+  exit 1
 end