fix v2 ver args err

pull/964/head
233boy 2 years ago
parent 7584ebf73a
commit d0a936920f
  1. 11
      v2ray.sh

@ -10,7 +10,7 @@ none='\e[0m'
# Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v3.58"
_version="v3.59"
cmd="apt-get"
@ -84,7 +84,14 @@ v2ray_client_config="/etc/v2ray/233blog_v2ray_config.json"
v2ray_pid=$(pgrep -f /usr/bin/v2ray/v2ray)
caddy_pid=$(pgrep -f /usr/local/bin/caddy)
_v2ray_sh="/usr/local/sbin/v2ray"
v2ray_ver="$(/usr/bin/v2ray/v2ray -version | head -n 1 | cut -d " " -f2)"
/usr/bin/v2ray/v2ray -version >/dev/null 2>&1
if [[ $? == 0 ]]; then
v2ray_ver="$(/usr/bin/v2ray/v2ray -version | head -n 1 | cut -d " " -f2)"
else
v2ray_ver="$(/usr/bin/v2ray/v2ray version | head -n 1 | cut -d " " -f2)"
fi
. /etc/v2ray/233boy/v2ray/src/init.sh
systemd=true
# _test=true

Loading…
Cancel
Save