Class: Rails::MongrelServer::Restart
- Includes:
- Mongrel::Command::Base
- Defined in:
- lib/rails/mongrel_server/commands.rb
Instance Method Summary collapse
Instance Method Details
#configure ⇒ Object
320 321 322 323 324 325 |
# File 'lib/rails/mongrel_server/commands.rb', line 320 def configure [ ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, '.'], ['-P', '--pid FILE', "Where the PID file is located", :@pid_file, "log/mongrel.pid"] ] end |
#run ⇒ Object
337 338 339 |
# File 'lib/rails/mongrel_server/commands.rb', line 337 def run MongrelServer::send_signal("USR2", @pid_file) end |
#validate ⇒ Object
327 328 329 330 331 332 333 334 335 |
# File 'lib/rails/mongrel_server/commands.rb', line 327 def validate @cwd = File.(@cwd) valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd" Dir.chdir @cwd valid_exists? @pid_file, "PID file #@pid_file does not exist. Not running?" return @valid end |