Correct management of leadership
This commit is contained in:
@ -4,16 +4,18 @@
|
||||
# and secure MariaDB installation
|
||||
#
|
||||
|
||||
ROLE=$(CreoleGet dbClusterPosition)
|
||||
ROLE=$(CreoleGet dbClusterPosition 'Leader')
|
||||
SECURE_CMD="mysql_secure_installation"
|
||||
PASSWORD=$(pwgen -1 10)
|
||||
passwd="/usr/share/eole/sbin/mariadbPwd"
|
||||
logfile="/var/log/eole/maria-init.log"
|
||||
|
||||
${passwd} ${PASSWORD}
|
||||
if [[ ${ROLE} == "Leader" ]]
|
||||
then
|
||||
${passwd} ${PASSWORD}
|
||||
|
||||
# Run secure installation script
|
||||
${SECURE_CMD} > ${logfile} 2>&1 <<__EOF__
|
||||
# Run secure installation script
|
||||
${SECURE_CMD} > ${logfile} 2>&1 <<__EOF__
|
||||
${PASSWORD}
|
||||
y
|
||||
n
|
||||
@ -22,3 +24,6 @@ y
|
||||
y
|
||||
y
|
||||
__EOF__
|
||||
else
|
||||
exit 0
|
||||
fi
|
Reference in New Issue
Block a user