def run(force_setup=False): if sys.version_info[0] == 2: CLI.colored_print("╔═══════════════════════════════════════════════════════════════╗", CLI.COLOR_ERROR) CLI.colored_print("║ DEPRECATION: Python 2.7 has reached the end of its life on ║", CLI.COLOR_ERROR) CLI.colored_print("║ January 1st, 2020. Please upgrade your Python as Python 2.7 ║", CLI.COLOR_ERROR) CLI.colored_print("║ is not maintained anymore. ║", CLI.COLOR_ERROR) CLI.colored_print("║ A future version of KoBoInstall will drop support for it. ║", CLI.COLOR_ERROR) CLI.colored_print("╚═══════════════════════════════════════════════════════════════╝", CLI.COLOR_ERROR) if not platform.system() in ["Linux", "Darwin"]: CLI.colored_print("Not compatible with this OS", CLI.COLOR_ERROR) else: config = Config() current_config = config.get_config() if config.first_time: force_setup = True if force_setup: current_config = config.build() Setup.clone_kobodocker(config) Template.render(config) config.init_letsencrypt() Setup.update_hosts(current_config) else: if config.auto_detect_network(): Template.render(config) Setup.update_hosts(current_config) Command.start()
def run(force_setup=False): if sys.version_info[0] == 2: message = ( 'DEPRECATION: Python 2.7 has reached the end of its life on ' 'January 1st, 2020. Please upgrade your Python as Python 2.7 is ' 'not maintained anymore.\n\n' 'A future version of KoBoInstall will drop support for it.') CLI.framed_print(message) if not platform.system() in ['Linux', 'Darwin']: CLI.colored_print('Not compatible with this OS', CLI.COLOR_ERROR) else: config = Config() dict_ = config.get_dict() if config.first_time: force_setup = True if force_setup: dict_ = config.build() Setup.clone_kobodocker(config) Template.render(config) config.init_letsencrypt() Setup.update_hosts(dict_) else: if config.auto_detect_network(): Template.render(config) Setup.update_hosts(dict_) Command.start()
def run(force_setup=False): if not platform.system() in ['Linux', 'Darwin']: CLI.colored_print('Not compatible with this OS', CLI.COLOR_ERROR) else: config = Config() dict_ = config.get_dict() if config.first_time: force_setup = True if force_setup: dict_ = config.build() Setup.clone_kobodocker(config) Template.render(config) Setup.update_hosts(dict_) else: if config.auto_detect_network(): Template.render(config) Setup.update_hosts(dict_) config.validate_passwords() Command.start(force_setup=force_setup)