def __init__(self): setattr(base.current_app, self.__class__.__name__, self) self.service_name = base.httpd_name self.pbar_text = "Configuring " + base.httpd_name self.app_type = AppType.SERVICE self.install_type = InstallOption.OPTONAL self.install_var = 'installHttpd' self.register_progess() self.needdb = False # we don't need backend connection in this class self.apache_version = base.determineApacheVersion() self.httpdKeyFn = os.path.join(Config.certFolder, 'httpd.key') self.httpdCertFn = os.path.join(Config.certFolder, 'httpd.crt') self.templates_folder = os.path.join(Config.templateFolder, 'apache') self.output_folder = os.path.join(Config.outputFolder, 'apache') self.apache2_conf = os.path.join(self.output_folder, 'httpd.conf') self.apache2_ssl_conf = os.path.join(self.output_folder, 'https_jans.conf') self.apache2_24_conf = os.path.join(self.output_folder, 'httpd_2.4.conf') self.apache2_ssl_24_conf = os.path.join(self.output_folder, 'https_jans.conf') self.https_jans_fn = '/etc/httpd/conf.d/https_jans.conf' if base.clone_type == 'rpm' else '/etc/apache2/sites-available/https_jans.conf'
Config.pbar = jansProgress for key in setupOptions: setattr(Config, key, setupOptions[key]) jansInstaller = JansInstaller() jansInstaller.initialize() print() print("Installing Janssen Server...\n\nFor more info see:\n {} \n {}\n". format(paths.LOG_FILE, paths.LOG_ERROR_FILE)) print("Detected OS : {} {} {}".format('snap' if base.snap else '', base.os_type, base.os_version)) print("Janssen Version : {}".format(Config.oxVersion)) print("Detected init : {}".format(base.os_initdaemon)) print("Detected Apache : {}".format(base.determineApacheVersion())) print() setup_loaded = {} if setupOptions['setup_properties']: base.logIt('%s Properties found!\n' % setupOptions['setup_properties']) setup_loaded = propertiesUtils.load_properties( setupOptions['setup_properties']) elif os.path.isfile(Config.setup_properties_fn): base.logIt('%s Properties found!\n' % Config.setup_properties_fn) setup_loaded = propertiesUtils.load_properties(Config.setup_properties_fn) elif os.path.isfile(Config.setup_properties_fn + '.enc'): base.logIt('%s Properties found!\n' % Config.setup_properties_fn + '.enc') setup_loaded = propertiesUtils.load_properties(Config.setup_properties_fn + '.enc')