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 "执行中..."