Updating bdd init script

This commit is contained in:
Philippe Caseiro 2018-04-12 16:12:42 +02:00
parent 91bdf0cbe6
commit f740f8b2bc
1 changed files with 23 additions and 0 deletions

23
preservice/25-bdd-init Normal file
View File

@ -0,0 +1,23 @@
#!/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__