Skip to content

Commit

Permalink
feat(jans-linux-setup): opa logs to file (#7826)
Browse files Browse the repository at this point in the history
Signed-off-by: Mustafa Baser <mbaser@mail.com>
  • Loading branch information
devrimyatar committed Feb 23, 2024
1 parent e8bec27 commit 3287863
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jans-linux-setup/jans_setup/setup_app/installers/jans_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self):
self.config_ldif = os.path.join(self.output_dir, 'config.ldif')
self.opa_dir = os.path.join(Config.opt_dir, 'opa')
self.opa_bin_dir = os.path.join(self.opa_dir, 'bin')
self.opa_log_dir = os.path.join(self.opa_dir, 'logs')

def install(self):
if Config.get('install_jans_lock_as_server'):
Expand Down Expand Up @@ -97,6 +98,7 @@ def install_opa(self):
opa_fn = 'opa'
self.systemd_units.append(opa_fn)
self.createDirs(self.opa_bin_dir)
self.createDirs(self.opa_log_dir)
self.copyFile(self.source_files[2][0], self.opa_bin_dir)
self.run([paths.cmd_chmod, '755', os.path.join(self.opa_bin_dir, opa_fn)])
self.chown(self.opa_dir, Config.jetty_user, Config.jetty_group, recursive=True)
Expand Down
2 changes: 2 additions & 0 deletions jans-linux-setup/jans_setup/static/system/systemd/opa.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ After=network.target
[Service]
Type=simple
ExecStart=%(opa_bin_dir)s/opa run --server --addr %(jans_opa_host)s:%(jans_opa_port)s
StandardOutput=file:%(opa_log_dir)s/stdout.log
StandardError=file:%(opa_log_dir)s/stderr.log

User=jetty
Group=jetty
Expand Down

0 comments on commit 3287863

Please sign in to comment.