添加脚本

pull/6/head
ibuler 2015-04-20 21:17:16 +08:00
parent e2ac212fc3
commit 7accf70e17
2 changed files with 15 additions and 3 deletions

13
docs/jumpserver.sh Normal file
View File

@ -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

View File

@ -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 &
;;