run with newest python version

This commit is contained in:
破娃酱 2017-05-02 12:40:23 +08:00
parent 1e85d14a48
commit 03b1a53b9a
7 changed files with 24 additions and 59 deletions

5
run.sh
View file

@ -1,6 +1,7 @@
#!/bin/bash
cd `dirname $0`
eval $(ps -ef | grep "[0-9] python server\\.py m" | awk '{print "kill "$2}')
python_ver=$(ls /usr/lib|grep "^python"|tail -1)
eval $(ps -ef | grep "[0-9] ${python_ver} server\\.py m" | awk '{print "kill "$2}')
ulimit -n 512000
nohup python server.py m>> /dev/null 2>&1 &
nohup ${python_ver} server.py m>> /dev/null 2>&1 &