From 7e8cbda6b0fda4e98d3ed159797bcb6038a9108e Mon Sep 17 00:00:00 2001 From: Akatsukiro Date: Mon, 22 Jan 2024 21:47:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=94=9F=E6=88=90=E9=80=89=E6=8B=A9=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E4=BF=A1=E6=81=AF=E5=A4=8D=E6=9D=82?= =?UTF-8?q?=E5=BA=A6=E4=B8=8D=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index db6375b..0352cbd 100644 --- a/install.sh +++ b/install.sh @@ -212,9 +212,9 @@ setup_database() { echo "自动生成数据库信息请输入1,手动输入请输入2,其他情况自动生成" read -e -r -p "请输入您的选择: " dbFlag if [[ $dbFlag == "1" ]]; then - db_user="lsky" - db_name="lsky" - db_password=$(openssl rand -base64 12) + db_user="lsky_$(openssl rand -base64 12 | tr -dc 'a-z0-9' | fold -w 8 | head -n 1)" + db_name="lsky_$(openssl rand -base64 12 | tr -dc 'a-z0-9' | fold -w 8 | head -n 1)" + db_password="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)" elif [[ $dbFlag == "2" ]]; then read -e -r -p "请输入数据库用户名: " db_user read -e -r -p "请输入数据库名称: " db_name