Browse Source

fix run script

dev
破娃酱 8 years ago
parent
commit
2388802e3f
  1. 2
      logrun.sh
  2. 2
      run.sh
  3. 2
      shadowsocks/logrun.sh
  4. 2
      shadowsocks/run.sh
  5. 2
      shadowsocks/stop.sh
  6. 2
      stop.sh

2
logrun.sh

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

2
run.sh

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

2
shadowsocks/logrun.sh

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

2
shadowsocks/run.sh

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

2
shadowsocks/stop.sh

@ -1,5 +1,5 @@
#!/bin/bash
python_ver=$(ls /usr/lib|grep "^python"|tail -1)
python_ver=$(ls /usr/bin|grep -e "^python[23]\.[1-9]\+$"|tail -1)
eval $(ps -ef | grep "[0-9] ${python_ver} server\\.py a" | awk '{print "kill "$2}')

2
stop.sh

@ -1,5 +1,5 @@
#!/bin/bash
python_ver=$(ls /usr/lib|grep "^python"|tail -1)
python_ver=$(ls /usr/bin|grep -e "^python[23]\.[1-9]\+$"|tail -1)
eval $(ps -ef | grep "[0-9] ${python_ver} server\\.py m" | awk '{print "kill "$2}')

Loading…
Cancel
Save