diff --git a/adbyby.sh b/adbyby.sh index d6e52c6..2bf2d17 100644 --- a/adbyby.sh +++ b/adbyby.sh @@ -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} diff --git a/aria2.sh b/aria2.sh index 7fcc21d..fafc1b0 100644 --- a/aria2.sh +++ b/aria2.sh @@ -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 ]" diff --git a/brook.sh b/brook.sh index 6c5b36c..7b22da2 100644 --- a/brook.sh +++ b/brook.sh @@ -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} diff --git a/goflyway.sh b/goflyway.sh index 5370b39..13d4499 100644 --- a/goflyway.sh +++ b/goflyway.sh @@ -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') diff --git a/lightsocks.sh b/lightsocks.sh index d3714c8..fb5e7eb 100644 --- a/lightsocks.sh +++ b/lightsocks.sh @@ -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 "" | sed -r 's/.*Release (.+) · gwuhaolin.*/\1/')