Skip to content

Commit

Permalink
fix: flex-linux-setup casa python lib dir
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Feb 24, 2022
1 parent bdcfdb7 commit 1e4752b
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions flex-linux-setup/flex_linux_setup/flex_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def __init__(self):
self.casa_config_fn = os.path.join(self.casa_dist_dir,'casa-config.jar')
self.casa_script_fn = os.path.join(self.casa_dist_dir,'Casa.py')
self.twillo_fn = os.path.join(self.casa_dist_dir,'twilio.jar')
self.py_lib_dir = '/opt/gluu/python/libs/'
self.py_lib_dir = '/opt/jans/python/libs/'

def download_files(self):
print("Downloading components")
Expand Down Expand Up @@ -175,7 +175,6 @@ def install_gluu_admin_ui(self):

def install_casa(self):


jans_auth_dir = os.path.join(Config.jetty_base, jansAuthInstaller.service_name)
jans_auth_custom_lib_dir = os.path.join(jans_auth_dir, 'custom/libs')

Expand All @@ -200,6 +199,8 @@ def install_casa(self):
print("Copying", fn, "to", self.py_lib_dir)
self.copyFile(fn, self.py_lib_dir)

self.run([paths.cmd_chown, '-R', '{0}:{0}'.format(Config.jetty_user), self.py_lib_dir])

# prepare casa scipt ldif
casa_auth_script_fn = os.path.join(self.templates_dir, 'casa_person_authentication_script.ldif')
base64_script_file = self.generate_base64_file(self.casa_script_fn, 1)
Expand Down Expand Up @@ -281,10 +282,6 @@ def install_casa(self):
self.copyFile(self.casa_war_fn, jetty_service_webapps_dir)
self.copyFile(self.casa_web_resources_fn, jetty_service_webapps_dir)
self.run([paths.cmd_chown, '-R', '{0}:{0}'.format(Config.jetty_user), jetty_service_dir])
gluu_python_dir = '/opt/gluu/python/'
self.run([paths.cmd_mkdir, '-p', os.path.join(gluu_python_dir, 'libs')])
self.run([paths.cmd_chown, '-R', '{0}:{0}'.format(Config.jetty_user), gluu_python_dir])


print("Updating apache configuration")
apache_directive_template_text = self.readFile(os.path.join(self.templates_dir, 'casa_apache_directive'))
Expand Down Expand Up @@ -326,17 +323,18 @@ def main():

installer_obj.install_gluu_admin_ui()

if argsp.casa_integration:
installer_obj.install_casa()
print("Restarting Jans Auth")
config_api_installer.restart('jans-auth')
print("Starting Casa")
config_api_installer.start('casa')
installer_obj.install_casa()
print("Restarting Jans Auth")
config_api_installer.restart('jans-auth')
print("Starting Casa")
config_api_installer.start('casa')

print("Restarting Janssen Config Api")
config_api_installer.restart()

print("Installation was completed. Browse https://{}/admin".format(Config.hostname))
print("Installation was completed.")
print("Browse https://{}/admin".format(Config.hostname))
print("Browse https://{}/casa".format(Config.hostname))

if __name__ == "__main__":
main()
Expand Down

0 comments on commit 1e4752b

Please sign in to comment.