valid? (God::Process)

    # File lib/god/process.rb, line 36
        def valid?
          # determine if we're tracking pid or not
          self.pid_file

          valid = true

          # a start command must be specified
          if self.start.nil?
            valid = false
            applog(self, :error, "No start command was specified")
          end

          # self-daemonizing processes must specify a stop command
          if !@tracking_pid && self.stop.nil?
            valid = false
            applog(self, :error, "No stop command was specified")
          end

          # uid must exist if specified
          if self.uid
            begin
              Etc.getpwnam(self.uid)
            rescue ArgumentError
              valid = false
              applog(self, :error, "UID for '#{self.uid}' does not exist")
            end
          end

          # gid must exist if specified
          if self.gid
            begin
              Etc.getgrnam(self.gid)
            rescue ArgumentError
              valid = false
              applog(self, :error, "GID for '#{self.gid}' does not exist")
            end
          end

          # pid dir must exist if specified
          if !@tracking_pid && !File.exist?(File.dirname(self.pid_file))
            valid = false
            applog(self, :error, "PID file directory '#{File.dirname(self.pid_file)}' does not exist")
          end

          # pid dir must be writable if specified
          if !@tracking_pid && File.exist?(File.dirname(self.pid_file)) && !file_writable?(File.dirname(self.pid_file))
            valid = false
            applog(self, :error, "PID file directory '#{File.dirname(self.pid_file)}' is not writable by #{self.uid || Etc.getlogin}")
          end

          # log dir must exist
          if !File.exist?(File.dirname(self.log))
            valid = false
            applog(self, :error, "Log directory '#{File.dirname(self.log)}' does not exist")
          end

          # log file or dir must be writable
          if File.exist?(self.log)
            unless file_writable?(self.log)
              valid = false
              applog(self, :error, "Log file '#{self.log}' exists but is not writable by #{self.uid || Etc.getlogin}")
            end
          else
            unless file_writable?(File.dirname(self.log))
              valid = false
              applog(self, :error, "Log directory '#{File.dirname(self.log)}' is not writable by #{self.uid || Etc.getlogin}")
            end
          end

          valid
        end