mirror of https://github.com/jumpserver/jumpserver
				
				
				
			fix bug
							parent
							
								
									eae5535b42
								
							
						
					
					
						commit
						f6d414d903
					
				| 
						 | 
				
			
			@ -0,0 +1,18 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
manage_file="./webroot/AutoSa/manage.py"
 | 
			
		||||
log_handler_file="./webroot/AutoSa/log_handler.py"
 | 
			
		||||
websocket_file="./webroot/AutoSa/websocket/index.js"
 | 
			
		||||
 | 
			
		||||
which node &> /dev/null
 | 
			
		||||
if [ $? != '0' ];then
 | 
			
		||||
    echo "Please define the node.js binary file 'node' in the PATH."
 | 
			
		||||
    exit
 | 
			
		||||
fi
 | 
			
		||||
node $websocket_file &
 | 
			
		||||
if [ -f $manage_file -a -e $manage_file ] && [ -f $log_handler_file -a -e $log_handler_file ];then
 | 
			
		||||
    $manage_file runserver 0.0.0.0:80 &> logs/access.log &
 | 
			
		||||
    $log_handler_file &> logs/handler.log   &
 | 
			
		||||
else
 | 
			
		||||
    echo "manage.py or log_handler.py isn't exist or executable."
 | 
			
		||||
fi
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
pids=$(ps axu | grep -E '(manage.py|log_handler|index.js)' | grep -v 'grep'  | awk '{ print $2 }')
 | 
			
		||||
for pid in $pids;do
 | 
			
		||||
    kill -15 $pid
 | 
			
		||||
done
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +0,0 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
./manage.py runserver 0.0.0.0:80 &> access.log &
 | 
			
		||||
./log_handler.py &> handler.log  &
 | 
			
		||||
node ./websocket/index.js &
 | 
			
		||||
		Loading…
	
		Reference in New Issue