Example #1
0
    if cfg.useSSL:
        protocol = 'https'
    else:
        protocol = 'http'
    baseUrl = "%s://%s:%s/conary/" % (protocol, os.uname()[1], cfg.port)

    # start the logging
    if 'migrate' in argSet:
        # make sure the migration progress is visible
        cfg.traceLog = (3, "stderr")
    if 'add-user' not in argSet and 'analyze' not in argSet:
        (l, f) = (3, "stderr")
        if cfg.traceLog:
            (l, f) = cfg.traceLog
        initLog(filename=f, level=l, trace=1)

    if cfg.tmpDir.endswith('/'):
        cfg.tmpDir = cfg.tmpDir[:-1]
    if os.path.realpath(cfg.tmpDir) != cfg.tmpDir:
        print "tmpDir cannot include symbolic links"
        sys.exit(1)

    if cfg.useSSL:
        errmsg = "Unable to start server with SSL support."
        if not SSL:
            print errmsg + " Please install m2crypto."
            sys.exit(1)
        if not (cfg.sslCert and cfg.sslKey):
            print errmsg + (" Please set the sslCert and sslKey "
                            "configuration options.")
Example #2
0
    if cfg.useSSL:
        protocol = 'https'
    else:
        protocol = 'http'
    baseUrl="%s://%s:%s/conary/" % (protocol, os.uname()[1], cfg.port)

    # start the logging
    if 'migrate' in argSet:
        # make sure the migration progress is visible
        cfg.traceLog = (3, "stderr")
    if 'add-user' not in argSet and 'analyze' not in argSet:
        (l, f) = (3, "stderr")
        if cfg.traceLog:
            (l, f) = cfg.traceLog
        initLog(filename = f, level = l, trace=1)

    if cfg.tmpDir.endswith('/'):
        cfg.tmpDir = cfg.tmpDir[:-1]
    if os.path.realpath(cfg.tmpDir) != cfg.tmpDir:
        print "tmpDir cannot include symbolic links"
        sys.exit(1)

    if cfg.useSSL:
        errmsg = "Unable to start server with SSL support."
        if not SSL:
            print errmsg + " Please install m2crypto."
            sys.exit(1)
        if not (cfg.sslCert and cfg.sslKey):
            print errmsg + (" Please set the sslCert and sslKey "
                            "configuration options.")