Skip to content

Commit

Permalink
fix(jans-linux-setup): jans cli corrections 9710 (#9747)
Browse files Browse the repository at this point in the history
* fix(jans-linux-setup): jans cli argument

Signed-off-by: Mustafa Baser <mbaser@mail.com>

* fix(jans-linux-setup): add opt folder to profile path

Signed-off-by: Mustafa Baser <mbaser@mail.com>

---------

Signed-off-by: Mustafa Baser <mbaser@mail.com>
  • Loading branch information
devrimyatar authored and imShakil committed Oct 28, 2024
1 parent e33d7a3 commit dc6e313
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 9 additions & 0 deletions jans-linux-setup/jans_setup/static/scripts/jans
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import argparse
import os
import sys
import subprocess
from pathlib import Path
from collections import OrderedDict
Expand All @@ -27,6 +28,11 @@ for i in JANS_SERVICES_:
if not i in JANS_SERVICES:
JANS_SERVICES.append(i)


if len(sys.argv) > 1 and sys.argv[1] == 'cli':
cli_args = sys.argv[2:]
sys.argv = sys.argv[:2]

parser = argparse.ArgumentParser(description="A top-level wrapper script for Janssen")
subparsers = parser.add_subparsers(dest='command')
subparsers.add_parser('version', help="shows version of currently installed Janssen Server")
Expand All @@ -50,6 +56,9 @@ argsp = parser.parse_args()
def status():
subprocess.run('sudo systemctl list-units --all "jans*"', shell=True)

def cli():
subprocess.run('/opt/jans/jans-cli/config-cli.py ' + ' '.join(cli_args), shell=True)

def tui():
subprocess.run('/opt/jans/jans-cli/jans_cli_tui.py', shell=True)

Expand Down
3 changes: 1 addition & 2 deletions jans-linux-setup/jans_setup/templates/system_profile_systemd
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
########################################################################

export JAVA_HOME=%(jre_home)s
export OPENDJ_JAVA_HOME=%(jre_home)s

export PATH=$PATH:$JAVA_HOME/bin:$NODE_HOME/bin
export PATH=$PATH:$JAVA_HOME/bin:$NODE_HOME/bin:%(jansOptBinFolder)s
########################################################################
# End Jans Block #
########################################################################

0 comments on commit dc6e313

Please sign in to comment.