Sha256: 31688696ff813aad6d39e62867a73d9b24b3a414b4a10cb79e1d7a0990cacfab

Contents?: true

Size: 411 Bytes

Versions: 69

Compression:

Stored size: 411 Bytes

Contents

module God
  module Behaviors
    
    class CleanPidFile < Behavior
      def valid?
        valid = true
        valid &= complain("Attribute 'pid_file' must be specified", self) if self.watch.pid_file.nil?
        valid
      end
  
      def before_start
        File.delete(self.watch.pid_file)
        
        "deleted pid file"
      rescue
        "no pid file to delete"
      end
    end
  
  end
end

Version data entries

69 entries across 69 versions & 21 rubygems

Version Path
god-0.9.0 lib/god/behaviors/clean_pid_file.rb
olgen-god-0.9.2 lib/god/behaviors/clean_pid_file.rb
olgen-god-0.9.1 lib/god/behaviors/clean_pid_file.rb
olgen-god-0.9.0 lib/god/behaviors/clean_pid_file.rb
god-0.8.0 lib/god/behaviors/clean_pid_file.rb
olgen-god-0.8.2 lib/god/behaviors/clean_pid_file.rb
olgen-god-0.8.1 lib/god/behaviors/clean_pid_file.rb
olgen-god-0.8.0 lib/god/behaviors/clean_pid_file.rb
god-0.7.22 lib/god/behaviors/clean_pid_file.rb
god-0.7.21 lib/god/behaviors/clean_pid_file.rb
god-0.7.20 lib/god/behaviors/clean_pid_file.rb
god-0.7.19 lib/god/behaviors/clean_pid_file.rb
god-0.7.18 lib/god/behaviors/clean_pid_file.rb
god-0.7.17 lib/god/behaviors/clean_pid_file.rb
god-0.7.16 lib/god/behaviors/clean_pid_file.rb
god-0.7.15 lib/god/behaviors/clean_pid_file.rb
god-0.7.14 lib/god/behaviors/clean_pid_file.rb
god-0.6.0 lib/god/behaviors/clean_pid_file.rb
god-0.7.11 lib/god/behaviors/clean_pid_file.rb
god-0.7.10 lib/god/behaviors/clean_pid_file.rb