Class: God::Behaviors::CleanUnixSocket
- Inherits:
-
God::Behavior
- Object
- God::Behavior
- God::Behaviors::CleanUnixSocket
- Defined in:
- lib/god/behaviors/clean_unix_socket.rb
Instance Attribute Summary
Attributes inherited from God::Behavior
Instance Method Summary collapse
Methods inherited from God::Behavior
#after_restart, #after_start, #after_stop, #before_restart, #before_stop, #friendly_name, generate
Methods included from Configurable
#base_name, complain, #complain, #friendly_name, #prepare, #reset
Instance Method Details
#before_start ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/god/behaviors/clean_unix_socket.rb', line 11 def before_start File.delete(self.watch.unix_socket) "deleted unix socket" rescue "no unix socket to delete" end |
#valid? ⇒ Boolean
5 6 7 8 9 |
# File 'lib/god/behaviors/clean_unix_socket.rb', line 5 def valid? valid = true valid &= complain("Attribute 'unix_socket' must be specified", self) if self.watch.unix_socket.nil? valid end |