Skip to content

Commit

Permalink
# 优化进程检测机制,避免部分系统检测进程状态错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo authored Oct 18, 2018
1 parent 0411bed commit 9d2ff39
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion adbyby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ check_installed_status(){
[[ ! -e ${adbyby_file} ]] && echo -e "${Error} ADbyby 没有安装,请检查 !" && exit 1
}
check_pid(){
PID=`ps -ef| grep "adbyby"| grep -v grep| grep -v ".sh"| grep -v "init.d"| grep -v "service"| awk '{print $2}'`
PID=`ps -ef| grep "adbyby"| grep -v grep| grep -v "adbyby.sh"| grep -v "init.d"| grep -v "service"| awk '{print $2}'`
}
Download_adbyby(){
cd ${file}
Expand Down
2 changes: 1 addition & 1 deletion aria2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ check_crontab_installed_status(){
fi
}
check_pid(){
PID=`ps -ef| grep "aria2c"| grep -v grep| grep -v ".sh"| grep -v "init.d"| grep -v "service"| awk '{print $2}'`
PID=`ps -ef| grep "aria2c"| grep -v grep| grep -v "aria2.sh"| grep -v "init.d"| grep -v "service"| awk '{print $2}'`
}
check_new_ver(){
echo -e "${Info} 请输入 Aria2 版本号,格式如:[ 1.34.0 ],获取地址:[ https://github.com/q3aql/aria2-static-builds/releases ]"
Expand Down
2 changes: 1 addition & 1 deletion brook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ check_crontab_installed_status(){
fi
}
check_pid(){
PID=$(ps -ef| grep "./brook "| grep -v "grep" | grep -v "init.d" |grep -v "service" |awk '{print $2}')
PID=$(ps -ef| grep "./brook "| grep -v "grep" | grep -v "brook.sh" | grep -v "init.d" |grep -v "service" |awk '{print $2}')
}
check_new_ver(){
echo -e "请输入要下载安装的 Brook 版本号 ${Green_font_prefix}[ 格式是日期,例如: v20180707 ]${Font_color_suffix}
Expand Down
2 changes: 1 addition & 1 deletion goflyway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ check_crontab_installed_status(){
fi
}
check_pid(){
PID=$(ps -ef| grep "goflyway"| grep -v grep| grep -v ".sh"| grep -v "init.d"| grep -v "service"| awk '{print $2}')
PID=$(ps -ef| grep "goflyway"| grep -v grep| grep -v "goflyway.sh"| grep -v "init.d"| grep -v "service"| awk '{print $2}')
}
check_new_ver(){
new_ver=$(wget --no-check-certificate -qO- -t1 -T3 https://api.github.com/repos/coyove/goflyway/releases| grep "tag_name"| head -n 1| awk -F ":" '{print $2}'| sed 's/\"//g;s/,//g;s/ //g')
Expand Down
2 changes: 1 addition & 1 deletion lightsocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ check_crontab_installed_status(){
fi
}
check_pid(){
PID=`ps -ef| grep "lightsocks"| grep -v "grep" | grep -v ".sh"| grep -v "init.d" |grep -v "service" |awk '{print $2}'`
PID=`ps -ef| grep "lightsocks"| grep -v "grep" | grep -v "lightsocks.sh"| grep -v "init.d" |grep -v "service" |awk '{print $2}'`
}
check_new_ver(){
lightsocks_new_ver=$(wget --no-check-certificate -qO- https://github.com/gwuhaolin/lightsocks/releases/latest | grep "<title>" | sed -r 's/.*Release (.+) · gwuhaolin.*/\1/')
Expand Down

0 comments on commit 9d2ff39

Please sign in to comment.