Browse Source

[Update] 修改entrypoint并增加debug日志

pull/2423/head
ibuler 6 years ago
parent
commit
3e6e0153cf
  1. 12
      entrypoint.sh
  2. 15
      jms

12
entrypoint.sh

@ -2,15 +2,19 @@
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
if [[ "$1" == "bash" ]];then
bash
fi
trap cleanup EXIT
python jms start $service
python jms start ${service}

15
jms

@ -10,9 +10,20 @@ 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))
__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

Loading…
Cancel
Save