From 7accf70e17cd7cc41ad0e50437aadf315917c2de Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 20 Apr 2015 21:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/jumpserver.sh | 13 +++++++++++++ service.sh | 5 ++--- 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 docs/jumpserver.sh diff --git a/docs/jumpserver.sh b/docs/jumpserver.sh new file mode 100644 index 000000000..170614523 --- /dev/null +++ b/docs/jumpserver.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ $USER == 'admin' ] || [ $USER == 'root' ];then + echo "" +else + python /opt/jumpserver/connect.py + if [ $USER == 'guanghongwei' ];then + echo + else + exit 3 + echo + fi +fi diff --git a/service.sh b/service.sh index fbac87af4..84dbc41ba 100644 --- a/service.sh +++ b/service.sh @@ -5,14 +5,13 @@ # Author: jumpserver group . /etc/init.d/functions -export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin base_dir=$(dirname $0) case $1 in start) - daemon $base_dir/manage.py runserver 0.0.0.0:80 & - daemon $base_dir/log_handler.py & + python $base_dir/manage.py runserver 0.0.0.0:80 & + python $base_dir/log_handler.py & cd $base_dir/websocket/; daemon node index.js & ;;