@require_root<EOL>def main(overwrite):
logger.debug("<STR_LIT>", CONF_PATH)<EOL>if not os.path.exists(CONF_PATH):<EOL><INDENT>logger.debug("<STR_LIT>", CONF_PATH)<EOL>raise UserWarning(<EOL>"<STR_LIT>" % (<EOL>CONF_PATH,<EOL>)<EOL>)<EOL><DEDENT>logger.debug("<STR_LIT>", CONF_FILE)<EOL>if not os.path.exists(CONF_FILE):<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>_write_conf_file()<EOL><DEDENT>else:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>if not os.path.exists(CONF_FILE + "<STR_LIT:_>"):<EOL><INDENT>logger.debug(<EOL>"<STR_LIT>",<EOL>CONF_FILE,<EOL>CONF_FILE + "<STR_LIT:_>"<EOL>)<EOL>shutil.copyfile(CONF_FILE, CONF_FILE + "<STR_LIT:_>")<EOL><DEDENT>else:<EOL><INDENT>logger.debug(<EOL>"<STR_LIT>",<EOL>CONF_FILE<EOL>)<EOL><DEDENT><DEDENT>if overwrite:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>_write_conf_file()<EOL><DEDENT>logger.debug("<STR_LIT>", MODULES_FILE)<EOL>if not os.path.exists(MODULES_FILE) and _is_deb_system():<EOL><INDENT>with open(MODULES_FILE, "<STR_LIT:w>") as f:<EOL><INDENT>f.write(DEFAULT_MODULES_CONF)<EOL>logger.debug("<STR_LIT>", MODULES_FILE)<EOL><DEDENT><DEDENT>logger.debug("<STR_LIT>", DATA_PATH)<EOL>if not os.path.exists(DATA_PATH):<EOL><INDENT>logger.debug("<STR_LIT>", DATA_PATH)<EOL>os.makedirs(DATA_PATH, <NUM_LIT>)<EOL>logger.debug("<STR_LIT>", DATA_PATH)<EOL><DEDENT>logger.debug("<STR_LIT>", LOGIN_FILE)<EOL>if not os.path.exists(LOGIN_FILE):<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>open(LOGIN_FILE, "<STR_LIT:a>").close()<EOL>logger.debug("<STR_LIT>")<EOL><DEDENT>logger.debug("<STR_LIT>")<EOL>os.chown(LOGIN_FILE, get_ftp_uid(), -<NUM_LIT:1>)<EOL>os.chmod(LOGIN_FILE, <NUM_LIT>)<EOL>logger.debug("<STR_LIT>")<EOL>data = "<STR_LIT>"<EOL>with open(CONF_FILE) as f:<EOL><INDENT>data = f.read()<EOL><DEDENT>logger.debug("<STR_LIT>")<EOL>data = add_or_update(<EOL>data,<EOL>"<STR_LIT>",<EOL>LOGIN_FILE<EOL>)<EOL>logger.debug("<STR_LIT>")<EOL>data = add_or_update(data, "<STR_LIT>", "<STR_LIT>")<EOL>logger.debug("<STR_LIT>")<EOL>data = add_or_update(data, "<STR_LIT>", "<STR_LIT>")<EOL>logger.debug("<STR_LIT>")<EOL>data = add_or_update(data, "<STR_LIT>", '<STR_LIT>')<EOL>logger.debug("<STR_LIT>")<EOL>data = add_or_update(<EOL>data,<EOL>"<STR_LIT>",<EOL>LOG_FILE + "<STR_LIT>"<EOL>)<EOL>if not _is_deb_system():<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>data = comment(data, "<STR_LIT>")<EOL>data = comment(data, "<STR_LIT>")<EOL>data = add_or_update(data, "<STR_LIT>", "<STR_LIT>")<EOL><DEDENT>logger.debug("<STR_LIT>")<EOL>with open(CONF_FILE, "<STR_LIT:w>") as f:<EOL><INDENT>f.write(data)<EOL>logger.debug("<STR_LIT>")<EOL><DEDENT>logger.debug("<STR_LIT>")<EOL>reload_configuration()<EOL>logger.debug("<STR_LIT>")<EOL>logger.info("<STR_LIT>")<EOL>
Used to create configuration files, set permissions and so on.