Browse Source

changed to genpass

admin 2 months ago
parent
commit
f413f5ff80
1 changed files with 2 additions and 2 deletions
  1. 2 2
      utils/create_db.sh

+ 2 - 2
utils/create_db.sh

@@ -7,10 +7,10 @@
 DB_NAME=`echo $1 | tr -dc '[:alnum:]\n\r' | tr '[:upper:]' '[:lower:]'`
 
 # Source db root pass
-source /opt/docker/db/MYSQL_ROOT_PASSWORD.env
+source /opt/docker/db/.env
 
 # Generate password for the new db
-NEW_DB_PASS=`apg -n 1 -m 32 -M CN`
+NEW_DB_PASS=`pwgen --ambiguous 32 1`
 
 # Create db, corresponding user and grant privileges
 docker exec db mysql -p$MYSQL_ROOT_PASSWORD --execute "CREATE DATABASE $DB_NAME; \