Exemplo n.º 1
0
	if path_home == ".":
		path_home = path_install
	else:
		path_home = os.path.expanduser(path_home)
	#path_home = os.path.join(path_home, dir_mod)
	cfgloc    = os.path.join(path_home, conf_loc)
	if not config_exists(cfgloc, "Read '%s' for instructions" % (conf_def)):
		sys.exit(1)
	config_read(cfgloc, config)

	PluginsManager.discover(path_plugins)

	# enable listed plugins
	for name in config.options('plugins'):
		if name == 'admin':
			PluginsManager.enable(name)
			continue
		if config.getboolean('plugins', name):
			PluginsManager.enable(name)
		
	# write local config
	#config_write(cfgloc, config)


	# reset our terminal
	os.system('reset')

	# launch daemon
	daemon = Savage2Daemon(config)
	# enable inet server
	if config.getboolean('inet', 'enable'):
Exemplo n.º 2
0
    if path_home == ".":
        path_home = path_install
    else:
        path_home = os.path.expanduser(path_home)
    #path_home = os.path.join(path_home, dir_mod)
    cfgloc = os.path.join(path_home, conf_loc)
    if not config_exists(cfgloc, "Read '%s' for instructions" % (conf_def)):
        sys.exit(1)
    config_read(cfgloc, config)

    PluginsManager.discover(path_plugins)

    # enable listed plugins
    for name in config.options('plugins'):
        if name == 'admin':
            PluginsManager.enable(name)
            continue
        if config.getboolean('plugins', name):
            PluginsManager.enable(name)

    # write local config
    #config_write(cfgloc, config)

    # reset our terminal
    os.system('reset')

    # launch daemon
    daemon = Savage2Daemon(config)
    # enable inet server
    if config.getboolean('inet', 'enable'):
        daemon.enableServer()