diff --git a/install/next.py b/install/next.py index d4ff02429..58ae3ead5 100755 --- a/install/next.py +++ b/install/next.py @@ -89,7 +89,7 @@ class Setup(object): def _run_service(): os.system('sh %s start' % os.path.join(jms_dir, 'service.sh')) print - color_print('安装成功,请访问web, 祝你使用愉快。请访问 https://github.com/ibuler/jumpserver 查看文档') + color_print('安装成功,请访问web, 祝你使用愉快。请访问 https://github.com/ibuler/jumpserver 查看文档', 'green') def start(self): print "开始安装Jumpserver, 要求环境为 CentOS 6.5 x86_64" diff --git a/service.sh b/service.sh index f25e1b67a..b2d9b34ae 100755 --- a/service.sh +++ b/service.sh @@ -53,23 +53,17 @@ stop() { echo -n $"Stopping ${PROC_NAME} service:" - if [ -e $lockfile ];then - ps aux | grep -E 'manage.py|run_websocket.py' | grep -v grep | awk '{print $2}' | xargs kill -9 &> /dev/null - ret=$? - - if [ $ret -eq 0 ]; then - echo_success - echo - rm -f "$lockfile" - else - echo_failure - echo - rm -f "$lockfile" - fi + ps aux | grep -E 'manage.py|run_websocket.py' | grep -v grep | awk '{print $2}' | xargs kill -9 &> /dev/null + ret=$? + + if [ $ret -eq 0 ]; then + echo_success + echo + rm -f "$lockfile" else - echo_success - echo - + echo_failure + echo + rm -f "$lockfile" fi }