Exemplo n.º 1
0
def set_host_conf(host,conf_file):
    # set host-specific configuration
    _conf = copy.copy(default_conf) # default values
    # update with values in host config script
    execfile(conf_file,globals(),_conf)
    # initiate config object to default
    config[host] = Config(_conf)
    # set __file__ to host config script (used in admin/config)
    config[host].__file__ = conf_file
    config[host].host_name = host
    config[host].rlock = rlock
    config[host].server_type = server_type
    k_sessions.init_config_session(config[host])
Exemplo n.º 2
0
execfile(os.path.join(options['data_dir'],"conf.py"),options)

# add core and package to sys.path
for _dir in ["core","package"]:
    path = os.path.join(karrigell_dir,_dir)
    if not path in sys.path:
        sys.path.append(path)

# set options in k_config
import k_config
k_config.init_apache(options)
k_config.modules = options['modules']


config = k_config.config[None]
config.server_type = "Multiprocess"
# dummy locking

class dummy_lock:

    def acquire(self):
        pass

    def release(self):
        pass

config.rlock = dummy_lock()
import k_sessions
k_sessions.init_config_session(config)