From 2a70ef55a3ee206fb2048279173f1d8a717bebe1 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Fri, 31 Oct 2014 17:18:07 +0800 Subject: [PATCH] Fix a bug --- shadowsocks-libev-debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks-libev-debian.sh b/shadowsocks-libev-debian.sh index 7d1b388..9d2319b 100644 --- a/shadowsocks-libev-debian.sh +++ b/shadowsocks-libev-debian.sh @@ -130,7 +130,7 @@ function install(){ # Add run on system start up cat /etc/rc.local | grep 'ss-server' > /dev/null 2>&1 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 fi # Run shadowsocks in the background