def METHOD_NAME(self):
    if not self.args:
        self.out('You must give a config file')
        return 2
    app_spec = self.args[0]
    app_name = self.options.app_name
    vars = self.get_options()
    if not self._scheme_re.search(app_spec):
        app_spec = 'config:' + app_spec
    server_name = self.options.server_name
    if self.options.server:
        server_spec = 'egg:Zope2'
        assert server_name is None
        server_name = self.options.server
    else:
        server_spec = app_spec
    base = os.getcwd()
    log_fn = app_spec
    if log_fn.startswith('config:'):
        log_fn = app_spec[len('config:'):]
    elif log_fn.startswith('egg:'):
        log_fn = None
    if log_fn:
        log_fn = os.path.join(base, log_fn)
        setup_logging(log_fn, global_conf=vars)
    server = self.loadserver(server_spec, name=server_name,
                             relative_to=base, global_conf=vars)
    if 'debug_mode' not in vars and self.options.debug:
        vars['debug_mode'] = 'true'
    if 'debug_exceptions' not in vars and self.options.debug_exceptions:
        vars['debug_exceptions'] = 'true'
    app = self.loadapp(app_spec, name=app_name, relative_to=base,
                       global_conf=vars)
    if self.options.verbose > 0:
        if hasattr(os, 'getpid'):
            msg = 'Starting server in PID %i.' % os.getpid()
        else:
            msg = 'Starting server.'
        self.out(msg)
    def serve():
        self.makePidFile()
        try:
            server(app)
        except (SystemExit, KeyboardInterrupt) as e:
            if self.options.verbose > 1:
                raise
            if str(e):
                msg = ' ' + str(e)
            else:
                msg = ''
            self.out('Exiting%s (-v to see traceback)' % msg)
        finally:
            for db in Zope2.opened:
                db.close()
            self.unlinkPidFile()
    serve()