Browse Source

Merge pull request #2423 from jumpserver/dev

Dev
pull/2486/head 1.4.8
老广 6 years ago committed by GitHub
parent
commit
232674b1c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/__init__.py
  2. 2
      apps/templates/_footer.html
  3. 13
      entrypoint.sh
  4. 20
      jms

2
apps/__init__.py

@ -2,4 +2,4 @@
# -*- coding: utf-8 -*-
#
__version__ = "1.4.7"
__version__ = "1.4.8"

2
apps/templates/_footer.html

@ -1,7 +1,7 @@
{% load i18n %}
<div class="footer fixed">
<div class="pull-right">
Version <strong>1.4.7-{% include '_build.html' %}</strong> GPLv2.
Version <strong>1.4.8-{% include '_build.html' %}</strong> GPLv2.
<!--<img style="display: none" src="http://www.jumpserver.org/img/evaluate_avatar1.jpg">-->
</div>
<div>

13
entrypoint.sh

@ -2,15 +2,20 @@
function cleanup()
{
local pids=`jobs -p`
if [[ "$pids" != "" ]]; then
kill $pids >/dev/null 2>/dev/null
if [[ "${pids}" != "" ]]; then
kill ${pids} >/dev/null 2>/dev/null
fi
}
service="all"
if [ "$1" != "" ];then
if [[ "$1" != "" ]];then
service=$1
fi
trap cleanup EXIT
python jms start $service
if [[ "$1" == "bash" ]];then
bash
else
python jms start ${service}
fi

20
jms

@ -10,14 +10,28 @@ import sys
import signal
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASE_DIR)
sys.path.insert(0, BASE_DIR)
from apps import __version__
try:
from apps import __version__
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
print("List apps: {}".format(os.listdir('apps')))
print('apps is: {}'.format(apps))
except:
pass
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)

Loading…
Cancel
Save