Fix a bug

This commit is contained in:
Teddysun 2014-10-31 17:18:07 +08:00
parent 45384c344d
commit 2a70ef55a3

View File

@ -130,7 +130,7 @@ function install(){
# Add run on system start up # Add run on system start up
cat /etc/rc.local | grep 'ss-server' > /dev/null 2>&1 cat /etc/rc.local | grep 'ss-server' > /dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
col=`awk '/exit/ {print NR}' /etc/rc.local` col=`awk 'END{print NR}' /etc/rc.local`
sed -i ''"$col"'i nohup /usr/local/bin/ss-server -c /etc/shadowsocks/config.json > /dev/null 2>&1 &' /etc/rc.local sed -i ''"$col"'i nohup /usr/local/bin/ss-server -c /etc/shadowsocks/config.json > /dev/null 2>&1 &' /etc/rc.local
fi fi
# Run shadowsocks in the background # Run shadowsocks in the background