Run success or not

This commit is contained in:
Teddysun 2014-05-13 20:55:48 +08:00
parent b5110373c8
commit da9e1ec2d3
3 changed files with 8 additions and 1 deletions

View File

@ -129,8 +129,10 @@ function install(){
if [ $? -ne 0 ]; then
echo "nohup /usr/local/bin/ss-server -c /etc/shadowsocks/config.json > /dev/null 2>&1 &" >> /etc/rc.local
fi
# Start shadowsocks
# Run shadowsocks in the background
nohup /usr/local/bin/ss-server -c /etc/shadowsocks/config.json > /dev/null 2>&1 &
# Run success or not
ps -ef | grep -v grep | grep -v ps | grep -i '/usr/local/bin/ss-server' > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Shadowsocks-libev start success!"
else

View File

@ -151,6 +151,8 @@ function install(){
# Run it in the background
if [ -s /usr/local/bin/ssserver ]; then
nohup ssserver -c /etc/config.json > /dev/null 2>&1 &
# Run success or not
ps -ef | grep -v grep | grep -v ps | grep -i 'node /usr/local/bin/ssserver' > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Shadowsocks-nodejs start success!"
else

View File

@ -135,7 +135,10 @@ function install(){
pip install gevent
pip install shadowsocks
if [ -f /usr/bin/ssserver ]; then
# Run shadowsocks in the background
nohup ssserver -c /etc/config.json > /dev/null 2>&1 &
# Run success or not
ps -ef | grep -v grep | grep -v ps | grep -i '/usr/bin/python /usr/bin/ssserver' > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Shadowsocks start success!"
else