Browse Source

Fixing init script

2.6.2/master
Philippe Caseiro 1 year ago
parent
commit
b0f9914eac
1 changed files with 10 additions and 2 deletions
  1. 10
    2
      preservice/25-bdd-init

+ 10
- 2
preservice/25-bdd-init View File

@@ -20,6 +20,7 @@ logfile="${logdir}/maria-init.log"
20 20
 
21 21
 if [[ ${ROLE} == "Leader" ]]
22 22
 then
23
+   service mysql start
23 24
    ${passwd} ${PASSWORD}
24 25
 
25 26
    # Run secure installation script
@@ -32,8 +33,15 @@ y
32 33
 y
33 34
 y
34 35
 __EOF__
35
-   touch ${INITDONE}
36
-   exit ${?}
36
+   if [[ ${?} -eq 0 ]]
37
+   then
38
+	   service mysql stop
39
+	   touch ${INITDONE}
40
+	   exit ${?}
41
+   else
42
+	   service mysql stop
43
+	   exit ${?}
44
+   fi
37 45
 else
38 46
    exit 0
39 47
 fi

Loading…
Cancel
Save