eole-mariadb/posttemplate/25-bdd-cluster
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

19 lines
369 B
Bash
Executable File

#!/bin/bash
db=$(CreoleGet dbEnable non)
cluster=$(CreoleGet dbEnableCluster non)
role=$(CreoleGet dbClusterPosition 'Node')
gstateFile="/var/lib/mysql/grastate.dat"
if [[ ${db} == "oui" ]]
then
if [[ ${cluster} == "oui" ]]
then
if [[ ! -e ${gstateFile} ]]
then
[[ ${role} == "Leader" ]] && galera_new_cluster
fi
fi
fi
exit 0