Commit f6d414d9 authored by root's avatar root

fix bug

parent eae5535b
#!/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
#!/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
#!/bin/bash
./manage.py runserver 0.0.0.0:80 &> access.log &
./log_handler.py &> handler.log &
node ./websocket/index.js &
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment