diff --git a/install.sh b/install.sh index 8ab8b12a0..948dcf346 100644 --- a/install.sh +++ b/install.sh @@ -69,7 +69,7 @@ is_log_dir=/var/log/$is_core is_sh_bin=/usr/local/bin/$is_core is_sh_dir=$is_core_dir/sh is_sh_repo=$author/$is_core -is_pkg="wget unzip jq qrencode" +is_pkg="wget unzip jq" is_config_json=$is_core_dir/config.json tmp_var_lists=( tmpcore diff --git a/src/core.sh b/src/core.sh index b971ebf2c..322531c5e 100644 --- a/src/core.sh +++ b/src/core.sh @@ -203,7 +203,7 @@ is_port_used() { fi is_cant_test_port=1 msg "$is_warn 无法检测端口是否可用." - msg "请执行: $(_yellow "${cmd}update -y; ${cmd}install net-tools -y") 来修复此问题." + msg "请执行: $(_yellow "${cmd} update -y; ${cmd} install net-tools -y") 来修复此问题." } # ask input a string or pick a option for list. @@ -1553,7 +1553,11 @@ url_qr() { link="https://233boy.github.io/tools/qr.html#${is_url}" msg "\n------------- $is_config_name & QR code 二维码 -------------" msg - qrencode -t ANSI "${is_url}" + if [[ $(type -P qrencode) ]]; then + qrencode -t ANSI "${is_url}" + else + msg "请安装 qrencode: $(_green "$cmd update -y; $cmd install qrencode -y")" + fi msg msg "如果无法正常显示或识别, 请使用下面的链接来生成二维码:" msg "\n\e[4;${is_color}m${link}\e[0m\n" diff --git a/v2ray.sh b/v2ray.sh index c012feb08..77c89907e 100644 --- a/v2ray.sh +++ b/v2ray.sh @@ -1,6 +1,6 @@ #!/bin/bash args=$@ -is_sh_ver=v4.05 +is_sh_ver=v4.06 . /etc/v2ray/sh/src/init.sh