From 1e0cd1324e89e1581d3c8a3abe62c51560adbf17 Mon Sep 17 00:00:00 2001 From: wulabing Date: Sun, 30 Aug 2020 21:44:54 +0800 Subject: [PATCH] =?UTF-8?q?[modify]=20=E4=BF=AE=E5=A4=8D=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=AF=86=E5=88=AB=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 5c2ce76..f37d4e9 100644 --- a/install.sh +++ b/install.sh @@ -40,7 +40,8 @@ nginx_conf="${nginx_conf_dir}/v2ray.conf" nginx_dir="/etc/nginx" web_dir="/home/wwwroot" nginx_openssl_src="/usr/local/src" -v2ray_bin_dir="/usr/bin/v2ray" +v2ray_bin_dir_old="/usr/bin/v2ray" +v2ray_bin_dir="/usr/local/bin/v2ray" v2ray_info_file="$HOME/v2ray_info.inf" v2ray_qr_config_file="/usr/local/vmess_qr.json" nginx_systemd_file="/etc/systemd/system/nginx.service" @@ -819,6 +820,7 @@ uninstall_all() { [[ -f $nginx_systemd_file ]] && rm -f $nginx_systemd_file [[ -f $v2ray_systemd_file ]] && rm -f $v2ray_systemd_file [[ -d $v2ray_bin_dir ]] && rm -rf $v2ray_bin_dir + [[ -d $v2ray_bin_dir_old ]] && rm -rf $v2ray_bin_dir_old if [[ -d $nginx_dir ]]; then echo -e "${OK} ${Green} 是否卸载 Nginx [Y/N]? ${Font}" read -r uninstall_nginx @@ -842,7 +844,7 @@ delete_tls_key_and_crt() { echo -e "${OK} ${GreenBG} 已清空证书遗留文件 ${Font}" } judge_mode() { - if [ -f $v2ray_bin_dir/v2ray ]; then + if [ -f $v2ray_bin_dir/v2ray ] || [ -f $v2ray_bin_dir_old/v2ray ]; then if grep -q "ws" $v2ray_qr_config_file; then shell_mode="ws" elif grep -q "h2" $v2ray_qr_config_file; then