From ebb68b0fc681c0dc2e902def1876cf0af16d1bcf Mon Sep 17 00:00:00 2001 From: milky0217 Date: Wed, 10 Jun 2026 09:03:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20set-paid-user.sh=E6=B7=BB=E5=8A=A0DB=5FN?= =?UTF-8?q?AME=E9=BB=98=E8=AE=A4=E5=80=BC+=E5=85=BC=E5=AE=B9=E7=AE=A1?= =?UTF-8?q?=E9=81=93=E8=BE=93=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/set-paid-user.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/set-paid-user.sh b/scripts/set-paid-user.sh index a04193b..5590203 100755 --- a/scripts/set-paid-user.sh +++ b/scripts/set-paid-user.sh @@ -54,6 +54,7 @@ SSH_HOST=$(get_ssh_host) DB_CONTAINER="1Panel-postgresql-FtMo" DB_USER="milkydata" +: "${DB_NAME:=milkydata}" # 默认生产库 # ---------- 构建 SQL ---------- case "$ACTION" in @@ -89,7 +90,7 @@ echo "将要执行:" echo " ${SQL}" echo "" read -p "确认执行? [y/N] " -n 1 -r; echo -[[ ! $REPLY =~ ^[Yy]$ ]] && { echo "已取消"; exit 0; } +if [ "${REPLY:-N}" != "y" ] && [ "${REPLY:-N}" != "Y" ]; then echo "已取消"; exit 0; fi echo "" echo "执行中..."