From a7e57aa30268738347ad6844e10191c468572b42 Mon Sep 17 00:00:00 2001 From: Mustafa Baser Date: Tue, 1 Mar 2022 12:12:29 +0300 Subject: [PATCH] fix(jans-linux-setup): service install check for jetty 10 (#911) --- jans-linux-setup/jans_setup/setup_app/installers/base.py | 2 +- .../jans_setup/setup_app/installers/config_api.py | 3 --- jans-linux-setup/jans_setup/setup_app/installers/eleven.py | 4 ---- jans-linux-setup/jans_setup/setup_app/installers/fido.py | 3 --- jans-linux-setup/jans_setup/setup_app/installers/jans_auth.py | 3 --- jans-linux-setup/jans_setup/setup_app/installers/jetty.py | 3 +++ jans-linux-setup/jans_setup/setup_app/installers/scim.py | 3 --- 7 files changed, 4 insertions(+), 17 deletions(-) diff --git a/jans-linux-setup/jans_setup/setup_app/installers/base.py b/jans-linux-setup/jans_setup/setup_app/installers/base.py index 54c32c6b44e..76125ad22ff 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/base.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/base.py @@ -220,7 +220,7 @@ def copy_static(self): def installed(self): return None - + def check_need_for_download(self): pass diff --git a/jans-linux-setup/jans_setup/setup_app/installers/config_api.py b/jans-linux-setup/jans_setup/setup_app/installers/config_api.py index 0829b6f4cfd..f521291b233 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/config_api.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/config_api.py @@ -68,9 +68,6 @@ def install(self): self.enable() - def installed(self): - return os.path.exists(os.path.join(Config.jetty_base, self.service_name, 'start.ini')) - def create_folders(self): for d in (self.output_folder, self.custom_config_dir): diff --git a/jans-linux-setup/jans_setup/setup_app/installers/eleven.py b/jans-linux-setup/jans_setup/setup_app/installers/eleven.py index 41680db4c41..b32a028507d 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/eleven.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/eleven.py @@ -60,7 +60,3 @@ def render_import_templates(self): def create_folders(self): pass - - - def installed(self): - return os.path.exists(os.path.join(Config.jetty_base, self.service_name, 'start.ini')) diff --git a/jans-linux-setup/jans_setup/setup_app/installers/fido.py b/jans-linux-setup/jans_setup/setup_app/installers/fido.py index 563d7ed5d9d..913f62d26fd 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/fido.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/fido.py @@ -87,6 +87,3 @@ def copy_static(self): self.run([paths.cmd_mkdir, '-p', target_dir]) self.copyFile(apple_weauthn, target_dir) - - def installed(self): - return os.path.exists(os.path.join(Config.jetty_base, self.service_name, 'start.ini')) diff --git a/jans-linux-setup/jans_setup/setup_app/installers/jans_auth.py b/jans-linux-setup/jans_setup/setup_app/installers/jans_auth.py index 69a831ba7f9..39c7c8442e8 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/jans_auth.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/jans_auth.py @@ -157,6 +157,3 @@ def import_openbanking_key(self): if os.path.isfile(Config.ob_key_fn) and os.path.isfile(Config.ob_cert_fn): self.gen_keystore('obsigning', self.oxauth_openid_jks_fn, Config.oxauth_openid_jks_pass, Config.ob_key_fn, Config.ob_cert_fn, Config.ob_alias) - - def installed(self): - return os.path.exists(os.path.join(Config.jetty_base, self.service_name, 'start.ini')) diff --git a/jans-linux-setup/jans_setup/setup_app/installers/jetty.py b/jans-linux-setup/jans_setup/setup_app/installers/jetty.py index d71e8a7428d..81de18220c0 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/jetty.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/jetty.py @@ -382,3 +382,6 @@ def add_extra_class(self, class_path, xml_fn=None): f.write(b'\n') f.write(b'\n') f.write(ET.tostring(root, method='xml')) + + def installed(self): + return os.path.exists(os.path.join(Config.jetty_base, self.service_name, 'start.ini')) or os.path.exists(os.path.join(Config.jetty_base, self.service_name, 'start.d/server.ini')) diff --git a/jans-linux-setup/jans_setup/setup_app/installers/scim.py b/jans-linux-setup/jans_setup/setup_app/installers/scim.py index fee96b7bac7..8e34226b172 100644 --- a/jans-linux-setup/jans_setup/setup_app/installers/scim.py +++ b/jans-linux-setup/jans_setup/setup_app/installers/scim.py @@ -46,9 +46,6 @@ def install(self): self.war_for_jetty10(os.path.join(jettyServiceWebapps, os.path.basename(self.source_files[0][0]))) self.enable() - def installed(self): - return os.path.exists(os.path.join(Config.jetty_base, self.service_name, 'start.ini')) - def create_scope(self, scope, inum_base='0001.'): result = self.check_scope(scope['jansId'][0])