Update shadowsocks.tpl

This commit is contained in:
midoks
2020-06-05 17:41:53 +08:00
parent f4e5e411c1
commit 78139430e9
+3 -3
View File
@@ -15,14 +15,14 @@
ROOT_PATH={$SERVER_PATH}
p_start(){
isStart=$(ps -ef | grep shadowsocks | grep -v grep | awk '{print $2}')
isStart=$(ps -ef | grep shadowsocks | grep -v grep | grep -v 'init.d' | grep -v 'service' | awk '{print $2}')
if [ "$isStart" == "" ];then
echo -e "Starting shadowsocks... \c"
ssserver -c $ROOT_PATH/shadowsocks/shadowsocks.json -d start
sleep 0.3
isStart=$(ps -ef | grep shadowsocks | grep -v grep | awk '{print $2}')
isStart=$(ps -ef | grep shadowsocks | grep -v grep | grep -v 'init.d' | grep -v 'service' | awk '{print $2}')
if [ "$isStart" == '' ];then
echo -e "\033[31mError: shadowsocks service startup failed.\033[0m"
return;
@@ -36,7 +36,7 @@ p_start(){
p_stop(){
echo -e "Stopping shadowsocks... \c";
pids=$(ps -ef | grep shadowsocks | grep -v grep | awk '{print $2}')
pids=$(ps -ef | grep shadowsocks | grep -v grep | grep -v 'init.d' | grep -v 'service' | awk '{print $2}')
arr=($pids)
for p in ${arr[@]}