Merge branch 'master' into dist/eole/2.6.2/master

This commit is contained in:
Philippe Caseiro 2018-05-09 13:33:15 +02:00
commit 764ae6320c
1 changed files with 6 additions and 1 deletions

View File

@ -8,10 +8,14 @@ ROLE=$(CreoleGet dbClusterPosition 'Leader')
SECURE_CMD="mysql_secure_installation" SECURE_CMD="mysql_secure_installation"
PASSWORD=$(pwgen -1 10) PASSWORD=$(pwgen -1 10)
passwd="/usr/share/eole/sbin/mariadbPwd" passwd="/usr/share/eole/sbin/mariadbPwd"
logfile="/var/log/eole/maria-init.log" logdir="/var/log/eole"
logfile="${logdir}/maria-init.log"
[[ ! -d "${logdir}" ]] && mkdir -p ${logdir}
if [[ ${ROLE} == "Leader" ]] if [[ ${ROLE} == "Leader" ]]
then then
service mariadb start
${passwd} ${PASSWORD} ${passwd} ${PASSWORD}
# Run secure installation script # Run secure installation script
@ -24,6 +28,7 @@ y
y y
y y
__EOF__ __EOF__
service mariadb stop
else else
exit 0 exit 0
fi fi