Update install.sh

This commit is contained in:
wnlen
2026-01-14 23:29:01 +08:00
committed by GitHub
parent 5de2a5b9c9
commit 61829f17a1

View File

@ -239,7 +239,6 @@ api_host="${EXTERNAL_CONTROLLER%:*}"
if [ -z "$api_host" ] || [ "$api_host" = "$EXTERNAL_CONTROLLER" ]; then if [ -z "$api_host" ] || [ "$api_host" = "$EXTERNAL_CONTROLLER" ]; then
api_host="127.0.0.1" api_host="127.0.0.1"
fi fi
echo -e "🌐 Dashboardhttp://${api_host}:${api_port}/ui"
# ---- Secret 展示(脱敏)---- # ---- Secret 展示(脱敏)----
CONF_DIR="${CLASH_INSTALL_DIR:-/opt/clash-for-linux}/conf" CONF_DIR="${CLASH_INSTALL_DIR:-/opt/clash-for-linux}/conf"
@ -255,12 +254,12 @@ if [ -n "$SECRET_VAL" ]; then
# 脱敏显示前4后4 # 脱敏显示前4后4
MASKED="${SECRET_VAL:0:4}****${SECRET_VAL: -4}" MASKED="${SECRET_VAL:0:4}****${SECRET_VAL: -4}"
echo "" echo ""
echo "🌐 Dashboardhttp://127.0.0.1:9090/ui" echo -e "🌐 Dashboardhttp://${api_host}:${api_port}/ui"
echo "🔐 Secret${MASKED}" echo "🔐 Secret${MASKED}"
echo " 查看完整 Secretsudo awk -F': *' '/^secret:/{print \$2; exit}' $CONF_FILE" echo " 查看完整 Secretsudo awk -F': *' '/^secret:/{print \$2; exit}' $CONF_FILE"
else else
echo "" echo ""
echo "🌐 Dashboardhttp://127.0.0.1:9090/ui" echo -e "🌐 Dashboardhttp://${api_host}:${api_port}/ui"
echo "🔐 Secret未读取到服务首次启动后生成可用以下命令查看" echo "🔐 Secret未读取到服务首次启动后生成可用以下命令查看"
echo " sudo awk -F': *' '/^secret:/{print \$2; exit}' $CONF_FILE" echo " sudo awk -F': *' '/^secret:/{print \$2; exit}' $CONF_FILE"
fi fi