update:script

This commit is contained in:
dichgrem
2026-01-11 12:48:57 +08:00
parent 04ce288ebc
commit 05c03a4030

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# install_singbox.sh # install_singbox.sh
# 版本号 # 版本号
SCRIPT_VERSION="1.12.12" SCRIPT_VERSION="1.12.15"
set -euo pipefail set -euo pipefail
# 颜色定义 # 颜色定义
@@ -296,14 +296,16 @@ EOF
printf "${GREEN}%s${NC}\n\n" "$LINK" printf "${GREEN}%s${NC}\n\n" "$LINK"
# 生成二维码 # 生成二维码
if command -v qrencode &>/dev/null; then if ! command -v qrencode &>/dev/null; then
printf "${CYAN}===== 二维码 =====${NC}\n" printf "${YELLOW}未安装 qrencode正在自动安装...${NC}\n"
qrencode -t ANSIUTF8 "$LINK" apt install -y qrencode &>/dev/null || {
printf "\n" printf "${RED}自动安装失败请手动执行apt install qrencode${NC}\n"
else return
printf "${YELLOW}未安装 qrencode无法生成二维码。\n" }
printf "安装方法apt install qrencode 或 yum install qrencode${NC}\n"
fi fi
printf "${CYAN}===== 二维码 =====${NC}\n"
qrencode -t ANSIUTF8 "$LINK"
printf "\n"
} }
# 卸载 Sing-box # 卸载 Sing-box