generate database passwod if one is not provided
This commit is contained in:
parent
174c301ede
commit
2b686c5ffd
@ -1,12 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
: ${KEYSTONE_DB_PASSWORD:=keystone}
|
||||
: ${KEYSTONE_ADMIN_PASSWORD:=redhat}
|
||||
|
||||
if ! [ "$KEYSTONE_ADMIN_TOKEN" ]; then
|
||||
KEYSTONE_ADMIN_TOKEN=$(openssl rand -hex 15)
|
||||
fi
|
||||
|
||||
if ! [ "$KEYSTONE_DB_PASSWORD" ]; then
|
||||
KEYSTONE_DB_PASSWORD=$(openssl rand -hex 15)
|
||||
fi
|
||||
|
||||
mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
|
||||
CREATE DATABASE IF NOT EXISTS keystone;
|
||||
GRANT ALL PRIVILEGES ON keystone.* TO
|
||||
|
Loading…
Reference in New Issue
Block a user