public Method

Start.validate

There's no documentation for this item.

Source Code

# File rails/mongrel_server/commands.rb, line 82
def validate
  if @config_file
    valid_exists?(@config_file, "Config file not there: #@config_file")
    return false unless @valid
    @config_file = File.expand_path(@config_file)
    load_config
    return false unless @valid
  end

  @cwd = File.expand_path(@cwd)
  valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd"

  # Change there to start, then we'll have to come back after daemonize
  Dir.chdir(@cwd)

  valid?(@prefix[0] == ?/ && @prefix[-1] != ?/, "Prefix must begin with / and not end in /") if @prefix
  valid_dir? File.dirname(@log_file), "Path to log file not valid: #@log_file"
  valid_dir? File.dirname(@pid_file), "Path to pid file not valid: #@pid_file"
  valid_dir? @docroot, "Path to docroot not valid: #@docroot"
  valid_exists? @mime_map, "MIME mapping file does not exist: #@mime_map" if @mime_map
  valid_exists? @config_file, "Config file not there: #@config_file" if @config_file
  valid_dir? File.dirname(@generate), "Problem accessing directory to #@generate" if @generate
  valid_user? @user if @user
  valid_group? @group if @group

  return @valid
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.