2018-04-12 10:50:35 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
db=$(CreoleGet dbEnable non)
|
|
|
|
cluster=$(CreoleGet dbEnableCluster non)
|
2018-04-12 16:01:43 +02:00
|
|
|
role=$(CreoleGet dbClusterPosition 'Node')
|
2018-04-12 10:50:35 +02:00
|
|
|
gstateFile="/var/lib/mysql/grastate.dat"
|
|
|
|
|
|
|
|
if [[ ${db} == "oui" ]]
|
|
|
|
then
|
|
|
|
if [[ ${cluster} == "oui" ]]
|
|
|
|
then
|
|
|
|
if [[ ! -e ${gstateFile} ]]
|
|
|
|
then
|
2018-04-12 16:01:43 +02:00
|
|
|
[[ ${role} == "Leader" ]] && galera_new_cluster
|
2018-04-12 10:50:35 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|