From f7b1bbae6809ca9c33a1b06443f1d912dbeb83b1 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Wed, 9 May 2018 13:32:42 +0200 Subject: [PATCH] Updating preservice script --- preservice/25-bdd-init | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/preservice/25-bdd-init b/preservice/25-bdd-init index 2646bd6..cc88378 100644 --- a/preservice/25-bdd-init +++ b/preservice/25-bdd-init @@ -8,10 +8,14 @@ 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" +logdir="/var/log/eole" +logfile="${logdir}/maria-init.log" + +[[ ! -d "${logdir}" ]] && mkdir -p ${logdir} if [[ ${ROLE} == "Leader" ]] then + service mariadb start ${passwd} ${PASSWORD} # Run secure installation script @@ -24,6 +28,7 @@ y y y __EOF__ + service mariadb stop else exit 0 fi \ No newline at end of file