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
197 198 199 200 201 202 |
# File 'lib/ap4r/mongrel_ap4r.rb', line 197 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
214 215 216 |
# File 'lib/ap4r/mongrel_ap4r.rb', line 214 def run send_signal("USR2", @pid_file) end |
#validate ⇒ Object
204 205 206 207 208 209 210 211 212 |
# File 'lib/ap4r/mongrel_ap4r.rb', line 204 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 |