Class: Ap4r::Mongrel::Restart
- Includes:
- Command::Base
- Defined in:
- lib/ap4r/mongrel_ap4r.rb
Instance Method Summary collapse
Methods included from Command::Base
Instance Method Details
#configure ⇒ Object
194 195 196 197 198 199 |
# File 'lib/ap4r/mongrel_ap4r.rb', line 194 def configure [ ['-c', '--chdir PATH', "Change to dir", :@cwd, Dir.pwd], ['-P', '--pid FILE', "PID file", :@pid_file, "log/mongrel_ap4r.pid"], ] end |
#run ⇒ Object
211 212 213 |
# File 'lib/ap4r/mongrel_ap4r.rb', line 211 def run send_signal("USR2", @pid_file) end |
#validate ⇒ Object
201 202 203 204 205 206 207 208 209 |
# File 'lib/ap4r/mongrel_ap4r.rb', line 201 def validate @cwd = File.(@cwd) valid_dir? @cwd, "Path of chdir not valid: #@cwd " Dir.chdir(@cwd) valid_dir? File.dirname(@pid_file), "Path to pid file not valid: #@pid_file" return @valid end |