# File lib/thin/runner.rb, line 170
    def run_command
      load_options_from_config_file! unless CONFIGLESS_COMMANDS.include?(@command)

      # PROGRAM_NAME is relative to the current directory, so make sure
      # we store and expand it before changing directory.
      Command.script = File.expand_path($PROGRAM_NAME)

      # Change the current directory ASAP so that all relative paths are
      # relative to this one.
      Dir.chdir(@options[:chdir]) unless CONFIGLESS_COMMANDS.include?(@command)

      @options[:require].each { |r| ruby_require r }

      # Setup the logger
      if @options[:quiet]
        Logging.silent = true
      else
        Logging.level = Logger::DEBUG if @options[:debug]
      end

      if @options[:trace]
        # Trace raw requests/responses
        Logging.trace_logger = Logging.logger
      end

      controller = case
      when cluster? then Controllers::Cluster.new(@options)
      when service? then Controllers::Service.new(@options)
      else               Controllers::Controller.new(@options)
      end

      if controller.respond_to?(@command)
        begin
          controller.send(@command, *@arguments)
        rescue RunnerError => e
          abort e.message
        end
      else
        abort "Invalid options for command: #{@command}"
      end
    end