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
dguettler-god-0.7.13.2 lib/god/behaviors/clean_pid_file.rb
dguettler-god-0.7.13.3 lib/god/behaviors/clean_pid_file.rb
dosire-god-0.7.10 lib/god/behaviors/clean_pid_file.rb
dosire-god-0.7.12 lib/god/behaviors/clean_pid_file.rb
dosire-god-0.7.9 lib/god/behaviors/clean_pid_file.rb
dunedain289-god-0.7.12.1 lib/god/behaviors/clean_pid_file.rb
dustin-god-0.7.7.1 lib/god/behaviors/clean_pid_file.rb
eric-god-0.7.10 lib/god/behaviors/clean_pid_file.rb
eric-god-0.7.11 lib/god/behaviors/clean_pid_file.rb
eric-god-0.7.12 lib/god/behaviors/clean_pid_file.rb
eric-god-0.7.14 lib/god/behaviors/clean_pid_file.rb
eric-god-0.7.7 lib/god/behaviors/clean_pid_file.rb
fotonauts-god-0.7.10 lib/god/behaviors/clean_pid_file.rb
fotonauts-god-0.7.12 lib/god/behaviors/clean_pid_file.rb
gohanlonllc-god-0.7.9 lib/god/behaviors/clean_pid_file.rb
gordoncww-god-0.7.11.1 lib/god/behaviors/clean_pid_file.rb
jreynolds-god-0.7.13 lib/god/behaviors/clean_pid_file.rb
jwilkins-god-0.7.9 lib/god/behaviors/clean_pid_file.rb
mathieuravaux-god-0.7.11 lib/god/behaviors/clean_pid_file.rb
mojombo-god-0.7.10 lib/god/behaviors/clean_pid_file.rb