repo.or.cz
/
god.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
default stop for auto-daemonized; bug fixes
[god.git]
/
lib
/
god
/
behaviors
/
clean_pid_file.rb
blob
7ef46ff55e95327a9d1e213a10fe09c3aeae3039
1
module God
2
module Behaviors
3
4
class CleanPidFile < Behavior
5
def valid?
6
valid = true
7
valid &= complain("You must specify the 'pid_file' attribute on the Watch for :clean_pid_file") if self.watch.pid_file.nil?
8
valid
9
end
10
11
def before_start
12
File.delete(self.watch.pid_file) rescue nil
13
end
14
end
15
16
end
17
end