Beispiel #1
0
def run_radiusd(config, daemon=False):
    if not daemon:
        from toughradius.radiusd import server

        server.run(config, db_engine=get_engine(config))
    else:
        _run_daemon(config, "radiusd")
Beispiel #2
0
def run_standalone(config, daemon=False):
    from twisted.internet import reactor
    from toughradius.console import admin_app
    from toughradius.console import customer_app
    from toughradius.radiusd import server
    logfile = config.get('radiusd', 'logfile')
    config.set('DEFAULT', 'standalone', 'true')
    config.set('admin', 'logfile', logfile)
    config.set('customer', 'logfile', logfile)
    if not daemon:
        db_engine = get_engine(config)
        server.run(config, db_engine, False)
        admin_app.run(config, db_engine, False)
        customer_app.run(config, db_engine, False)
        reactor.run()
    else:
        _run_daemon(config, 'standalone')
Beispiel #3
0
def run_standalone(config,daemon=False):
    from twisted.internet import reactor
    from toughradius.console import admin_app
    from toughradius.console import customer_app
    from toughradius.radiusd import server
    logfile = config.get('radiusd','logfile')
    config.set('DEFAULT','standalone','true')
    config.set('admin','logfile',logfile)
    config.set('customer','logfile',logfile)
    if not daemon:
        db_engine = get_engine(config)
        server.run(config,db_engine,False)
        admin_app.run(config,db_engine,False)
        customer_app.run(config,db_engine,False)
        reactor.run()
    else:
        _run_daemon(config,'standalone')
Beispiel #4
0
def run_standalone(config, daemon=False):
    """
    所有应用在一个进程的运行模式
    """
    from twisted.internet import reactor
    from toughradius.console import admin_app
    from toughradius.console import customer_app
    from toughradius.console import control_app
    from toughradius.radiusd import server

    logfile = config.get("radiusd", "logfile")
    config.set("DEFAULT", "standalone", "true")
    config.set("admin", "logfile", logfile)
    config.set("customer", "logfile", logfile)
    config.set("control", "logfile", logfile)
    if not daemon:
        db_engine = get_engine(config)
        server.run(config, db_engine, False)
        admin_app.run(config, db_engine, False)
        customer_app.run(config, db_engine, False)
        control_app.run(config, False)
        reactor.run()
    else:
        _run_daemon(config, "standalone")
Beispiel #5
0
def run_radiusd(config, daemon=False):
    if not daemon:
        from toughradius.radiusd import server
        server.run(config, db_engine=get_engine(config))
    else:
        _run_daemon(config, 'radiusd')