Class: God::Behaviors::CleanPidFile
Instance Attribute Summary
#watch
Instance Method Summary
collapse
#after_restart, #after_start, #after_stop, #before_restart, #before_stop, generate, #prepare
Instance Method Details
#before_start ⇒ Object
11
12
13
|
# File 'lib/god/behaviors/clean_pid_file.rb', line 11
def before_start
File.delete(self.watch.pid_file) rescue nil
end
|
#valid? ⇒ Boolean
5
6
7
8
9
|
# File 'lib/god/behaviors/clean_pid_file.rb', line 5
def valid?
valid = true
valid &= complain("You must specify the 'pid_file' attribute on the Watch for :clean_pid_file") if self.watch.pid_file.nil?
valid
end
|