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 27, 2024
1 parent 7a54ac2 commit e0b3f49
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 @@ -46,6 +46,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):
Expand Down Expand Up @@ -107,6 +108,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 e0b3f49

Please sign in to comment.