eole-mariadb/preservices/25-bdd-init
Philippe Caseiro 1dc370fb94 Clean root password Management
Don't store the root password.
Provide easy replacement for mysql_pwd.py
2018-04-12 16:01:43 +02:00

23 lines
332 B
Bash

#!/bin/bash
#
# Initialize root password
# and secure MariaDB installation
#
ROLE=$(CreoleGet dbClusterPosition)
SECURE_CMD="mysql_secure_installation"
PASSWORD=$(pwgen -1 10)
passwd="/usr/share/eole/scripts/mariadbPwd"
${passwd} ${PASSWORD}
# Run secure installation script
${SECURE_CMD} <<__EOF__
${oldPass}
y
n
y
y
y
y
__EOF__