From ddf60d25124f84ea09abe33baa062fe806744b61 Mon Sep 17 00:00:00 2001 From: ibuler Date: Fri, 22 Feb 2019 16:33:27 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E6=B7=BB=E5=8A=A0jms=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=92=8C=E4=BF=AE=E6=94=B9entrypoint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entrypoint.sh | 5 +++-- jms | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 41ac2dd33..f509203d4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,9 +12,10 @@ if [[ "$1" != "" ]];then service=$1 fi +trap cleanup EXIT if [[ "$1" == "bash" ]];then bash +else + python jms start ${service} fi -trap cleanup EXIT -python jms start ${service} diff --git a/jms b/jms index d7d03d125..bb10b7796 100755 --- a/jms +++ b/jms @@ -17,6 +17,8 @@ try: except ImportError as e: print("Not found __version__: {}".format(e)) print("Sys path: {}".format(sys.path)) + print("Python is: ") + print(subprocess.call('which python', shell=True)) __version__ = 'Unknown' try: import apps @@ -28,7 +30,8 @@ except ImportError as e: try: from apps.jumpserver.conf import load_user_config CONFIG = load_user_config() -except ImportError: +except ImportError as e: + print("Import error: {}".format(e)) print("Could not find config file, `cp config_example.yml config.yml`") sys.exit(1)