# File lib/daemons/pid.rb, line 31 def Pid.dir(dir_mode, dir, script) # nil script parameter is allowed so long as dir_mode is not :script return nil if dir_mode == :script && script.nil? case dir_mode when :normal return File.expand_path(dir) when :script return File.expand_path(File.join(File.split(script)[0],dir)) when :system return '/var/run' else raise Error.new("pid file mode '#{dir_mode}' not implemented") end end