Skip to content

Commit

Permalink
fix: 数据库信息生成选择不同导致的信息复杂度不同
Browse files Browse the repository at this point in the history
  • Loading branch information
akatsukiro committed Jan 22, 2024
1 parent 1215d6a commit 7e8cbda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e8cbda

Please sign in to comment.