1 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/createlinks smeserver-automysqlbackup-3.0.RC6/createlinks |
2 |
--- smeserver-automysqlbackup-3.0.RC6.old/createlinks 2019-09-22 11:08:45.785000000 -0400 |
3 |
+++ smeserver-automysqlbackup-3.0.RC6/createlinks 2019-10-02 23:50:31.337000000 -0400 |
4 |
@@ -13,7 +13,7 @@ |
5 |
/etc/automysqlbackup/mysql55.conf |
6 |
/etc/automysqlbackup/mysql57.conf |
7 |
/etc/automysqlbackup/mymaria.conf |
8 |
- |
9 |
+ /etc/e-smith/sql/init/automysqlbackup |
10 |
)) |
11 |
{ |
12 |
templates2events( |
13 |
@@ -24,3 +24,13 @@ |
14 |
) |
15 |
); |
16 |
} |
17 |
+ |
18 |
+# add action /etc/e-smith/events/actions/automysqlbackup to automysqlbackup-update bootstrap-console-save |
19 |
+foreach my $event (qw(automysqlbackup-update bootstrap-console-save)){ |
20 |
+ event_link("automysqlbackup", $event, "15"); |
21 |
+} |
22 |
+ |
23 |
+# add mysql.init restart to automysqlbackup-update |
24 |
+for my $event (qw(automysqlbackup-update)){ |
25 |
+safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");; |
26 |
+} |
27 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mymaria smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mymaria |
28 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mymaria 2019-09-22 11:08:45.786000000 -0400 |
29 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mymaria 1969-12-31 19:00:00.000000000 -0500 |
30 |
@@ -1 +0,0 @@ |
31 |
-disabled |
32 |
\ Pas de fin de ligne à la fin du fichier |
33 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql53 smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql53 |
34 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql53 2019-09-22 11:08:45.786000000 -0400 |
35 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql53 1969-12-31 19:00:00.000000000 -0500 |
36 |
@@ -1 +0,0 @@ |
37 |
-enabled |
38 |
\ Pas de fin de ligne à la fin du fichier |
39 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql55 smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql55 |
40 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql55 2019-09-22 11:08:45.787000000 -0400 |
41 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql55 1969-12-31 19:00:00.000000000 -0500 |
42 |
@@ -1 +0,0 @@ |
43 |
-disabled |
44 |
\ Pas de fin de ligne à la fin du fichier |
45 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql57 smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql57 |
46 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql57 2019-09-22 11:08:45.787000000 -0400 |
47 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/db/configuration/defaults/automysqlbackup/Mysql57 1969-12-31 19:00:00.000000000 -0500 |
48 |
@@ -1 +0,0 @@ |
49 |
-disabled |
50 |
\ Pas de fin de ligne à la fin du fichier |
51 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/db/configuration/migrate/85automysqlbackup smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/db/configuration/migrate/85automysqlbackup |
52 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/db/configuration/migrate/85automysqlbackup 2014-08-17 16:32:37.000000000 -0400 |
53 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/db/configuration/migrate/85automysqlbackup 2019-11-25 22:36:35.789000000 -0500 |
54 |
@@ -9,4 +9,9 @@ |
55 |
$rec->set_prop('DbPassword', $pw); |
56 |
} |
57 |
|
58 |
+# if mysql53 exists; ie before tidying the contrib : there is no mysql53 on SME, 5.1 or 5.5 |
59 |
+#delete Mymaria Mysql53 Mysql55 Mysql57; so we use the default as hardcoded in scripts |
60 |
+if ( defined $rec->prop('Mysql53') ){ |
61 |
+ $rec->delete_prop($_) for ( qw(Mymaria Mysql53 Mysql55 Mysql57) ); |
62 |
+} |
63 |
} |
64 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/events/actions/automysqlbackup smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/events/actions/automysqlbackup |
65 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/events/actions/automysqlbackup 1969-12-31 19:00:00.000000000 -0500 |
66 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/events/actions/automysqlbackup 2019-10-02 23:45:02.581000000 -0400 |
67 |
@@ -0,0 +1,25 @@ |
68 |
+#!/bin/bash |
69 |
+ |
70 |
+ |
71 |
+ |
72 |
+#check if mysql55 is instelled and enabled, if yes expand sql/init55 and restar mysql55-mysql.init |
73 |
+ |
74 |
+status55=`/sbin/e-smith/db configuration getprop mysql55-mysqld status|| echo "disabled"` |
75 |
+ |
76 |
+if [ $status55 == "enabled" ]; then |
77 |
+ |
78 |
+ /sbin/e-smith/expand-template /etc/e-smith/sql/init55/automysqlbackup |
79 |
+ /sbin/e-smith/service mysql55-mysql.init restart |
80 |
+ |
81 |
+fi |
82 |
+ |
83 |
+#check if mysql57 is installed and enabled, if yes expand sql/init57 and restar mysql57-mysql.init |
84 |
+status57=`/sbin/e-smith/db configuration getprop mysql57-mysqld status|| echo "disabled"` |
85 |
+ |
86 |
+if [ $status57 == "enabled" ]; then |
87 |
+ |
88 |
+ /sbin/e-smith/expand-template /etc/e-smith/sql/init57/automysqlbackup |
89 |
+ /sbin/e-smith/service mysql57-mysql.init restart |
90 |
+ |
91 |
+fi |
92 |
+ |
93 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/10start smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/10start |
94 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/10start 2019-09-22 11:08:45.787000000 -0400 |
95 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/10start 2019-09-22 12:29:19.921000000 -0400 |
96 |
@@ -1,7 +1,9 @@ |
97 |
{ |
98 |
my $mymaria = ${'mariadb55-mysqld'}{'status'} || 'disabled'; |
99 |
-my $myauto = ${'automysqlbackup'}{'Mymaria'} || 'disabled'; |
100 |
-if ($mymaria eq 'enabled' && $myauto eq 'enabled') { |
101 |
+my $myauto = ${'automysqlbackup'}{'Mymaria'} || 'enabled'; |
102 |
+our $status = ( $mymaria eq 'enabled' && $myauto eq 'enabled' ) ? 'enabled' : 'disabled'; |
103 |
+ |
104 |
+if ($status eq 'enabled') { |
105 |
$OUT .= <<'_EOF'; |
106 |
#version=3.0_rc2 |
107 |
# DONT'T REMOVE THE PREVIOUS VERSION LINE! |
108 |
@@ -15,4 +17,4 @@ |
109 |
$OUT .= "# DONT'T REMOVE THE PREVIOUS VERSION LINE!\n"; |
110 |
$OUT .= "# Automysqlbackup disabled\n"; |
111 |
} |
112 |
-} |
113 |
\ Pas de fin de ligne à la fin du fichier |
114 |
+} |
115 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/20db smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/20db |
116 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/20db 2019-09-22 11:08:45.787000000 -0400 |
117 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/20db 2019-09-22 12:33:13.017000000 -0400 |
118 |
@@ -1,7 +1,5 @@ |
119 |
{ |
120 |
-my $mymaria = ${'mariadb55-mysqld'}{'status'} || 'disabled'; |
121 |
-my $myauto = ${'automysqlbackup'}{'Mymaria'} || 'disabled'; |
122 |
-if ($mymaria eq 'enabled' && $myauto eq 'enabled') { |
123 |
+if ($status eq 'enabled') { |
124 |
$OUT .= <<'_EOF'; |
125 |
# DB Specific |
126 |
CONFIG_backup_dir=${BACKUPDIR}_mymaria |
127 |
@@ -11,4 +9,4 @@ |
128 |
# End |
129 |
_EOF |
130 |
} |
131 |
-} |
132 |
\ Pas de fin de ligne à la fin du fichier |
133 |
+} |
134 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/30end smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/30end |
135 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/30end 2019-09-22 11:08:45.787000000 -0400 |
136 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/30end 2019-09-22 12:33:01.067000000 -0400 |
137 |
@@ -1,7 +1,5 @@ |
138 |
{ |
139 |
-my $mymaria = ${'mariadb55-mysqld'}{'status'} || 'disabled'; |
140 |
-my $myauto = ${'automysqlbackup'}{'Mymaria'} || 'disabled'; |
141 |
-if ($mymaria eq 'enabled' && $myauto eq 'enabled') { |
142 |
+if ($status eq 'enabled') { |
143 |
$OUT .= <<'_EOF'; |
144 |
CONFIG_mailcontent=$MAILCONTENT |
145 |
CONFIG_mail_maxattsize=$SIZEMAIL |
146 |
@@ -13,4 +11,4 @@ |
147 |
umask 0077 |
148 |
_EOF |
149 |
} |
150 |
-} |
151 |
\ Pas de fin de ligne à la fin du fichier |
152 |
+} |
153 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/10start smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/10start |
154 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/10start 2019-09-22 11:08:45.788000000 -0400 |
155 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/10start 2019-10-03 13:17:34.546000000 -0400 |
156 |
@@ -1,7 +1,7 @@ |
157 |
{ |
158 |
-my $my53 = ${'mysqld'}{'status'} || 'disabled'; |
159 |
-my $myauto = ${'automysqlbackup'}{'Mysql53'} || 'disabled'; |
160 |
-if ($my53 eq 'enabled' && $myauto eq 'enabled') { |
161 |
+my $my51 = ${'mysqld'}{'status'} || 'disabled'; |
162 |
+my $myauto = ${'automysqlbackup'}{'Mysql51'} || 'enabled'; |
163 |
+if ($my51 eq 'enabled' && $myauto eq 'enabled') { |
164 |
$OUT .= <<'_EOF'; |
165 |
#version=3.0_rc2 |
166 |
# DONT'T REMOVE THE PREVIOUS VERSION LINE! |
167 |
@@ -16,4 +16,4 @@ |
168 |
$OUT .= "# DONT'T REMOVE THE PREVIOUS VERSION LINE!\n"; |
169 |
$OUT .= "# Automysqlbackup disabled\n"; |
170 |
} |
171 |
-} |
172 |
\ Pas de fin de ligne à la fin du fichier |
173 |
+} |
174 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/20db smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/20db |
175 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/20db 2019-09-22 11:08:45.788000000 -0400 |
176 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/20db 2019-10-03 11:58:59.334000000 -0400 |
177 |
@@ -1,7 +1,7 @@ |
178 |
{ |
179 |
-my $my53 = ${'mysqld'}{'status'} || 'disabled'; |
180 |
-my $myauto = ${'automysqlbackup'}{'Mysql53'} || 'disabled'; |
181 |
-if ($my53 eq 'enabled' && $myauto eq 'enabled') { |
182 |
+my $my51 = ${'mysqld'}{'status'} || 'disabled'; |
183 |
+my $myauto = ${'automysqlbackup'}{'Mysql51'} || 'enabled'; |
184 |
+if ($my51 eq 'enabled' && $myauto eq 'enabled') { |
185 |
$OUT .= "CONFIG_mysql_dump_socket='/var/lib/mysql/mysql.sock'\n"; |
186 |
} |
187 |
-} |
188 |
\ Pas de fin de ligne à la fin du fichier |
189 |
+} |
190 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/30end smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/30end |
191 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/30end 2019-09-22 11:08:45.788000000 -0400 |
192 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/myserver.conf/30end 2019-10-03 13:18:09.974000000 -0400 |
193 |
@@ -1,7 +1,7 @@ |
194 |
{ |
195 |
-my $my53 = ${'mysqld'}{'status'} || 'disabled'; |
196 |
-my $myauto = ${'automysqlbackup'}{'Mysql53'} || 'disabled'; |
197 |
-if ($my53 eq 'enabled' && $myauto eq 'enabled') { |
198 |
+my $my51 = ${'mysqld'}{'status'} || 'disabled'; |
199 |
+my $myauto = ${'automysqlbackup'}{'Mysql51'} || 'enabled'; |
200 |
+if ($my51 eq 'enabled' && $myauto eq 'enabled') { |
201 |
$OUT .= <<'_EOF'; |
202 |
CONFIG_mailcontent=$MAILCONTENT |
203 |
CONFIG_mail_maxattsize=$SIZEMAIL |
204 |
@@ -13,4 +13,4 @@ |
205 |
umask 0077 |
206 |
_EOF |
207 |
} |
208 |
-} |
209 |
\ Pas de fin de ligne à la fin du fichier |
210 |
+} |
211 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/10start smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/10start |
212 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/10start 2019-09-22 11:08:45.788000000 -0400 |
213 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/10start 2019-09-22 12:30:15.348000000 -0400 |
214 |
@@ -1,7 +1,9 @@ |
215 |
{ |
216 |
my $my55 = ${'mysql55-mysqld'}{'status'} || 'disabled'; |
217 |
-my $myauto = ${'automysqlbackup'}{'Mysql55'} || 'disabled'; |
218 |
-if ($my55 eq 'enabled' && $myauto eq 'enabled') { |
219 |
+my $myauto = ${'automysqlbackup'}{'Mysql55'} || 'enabled'; |
220 |
+our $status = ( $my55 eq 'enabled' && $myauto eq 'enabled' ) ? 'enabled' : 'disabled'; |
221 |
+ |
222 |
+if ($status eq 'enabled') { |
223 |
$OUT .= <<'_EOF'; |
224 |
#version=3.0_rc2 |
225 |
# DONT'T REMOVE THE PREVIOUS VERSION LINE! |
226 |
@@ -15,4 +17,4 @@ |
227 |
$OUT .= "# DONT'T REMOVE THE PREVIOUS VERSION LINE!\n"; |
228 |
$OUT .= "# Automysqlbackup disabled\n"; |
229 |
} |
230 |
-} |
231 |
\ Pas de fin de ligne à la fin du fichier |
232 |
+} |
233 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/20db smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/20db |
234 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/20db 2019-09-22 11:08:45.788000000 -0400 |
235 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/20db 2019-09-22 12:32:24.457000000 -0400 |
236 |
@@ -1,7 +1,5 @@ |
237 |
{ |
238 |
-my $my55 = ${'mysql55-mysqld'}{'status'} || 'disabled'; |
239 |
-my $myauto = ${'automysqlbackup'}{'Mysql55'} || 'disabled'; |
240 |
-if ($my55 eq 'enabled' && $myauto eq 'enabled') { |
241 |
+if ($status eq 'enabled') { |
242 |
$OUT .= <<'_EOF'; |
243 |
# DB Specific |
244 |
CONFIG_backup_dir=${BACKUPDIR}_mysql55 |
245 |
@@ -11,4 +9,4 @@ |
246 |
# End |
247 |
_EOF |
248 |
} |
249 |
-} |
250 |
\ Pas de fin de ligne à la fin du fichier |
251 |
+} |
252 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/30end smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/30end |
253 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/30end 2019-09-22 11:08:45.789000000 -0400 |
254 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql55.conf/30end 2019-09-22 12:32:42.293000000 -0400 |
255 |
@@ -1,7 +1,5 @@ |
256 |
{ |
257 |
-my $my55 = ${'mysql55-mysqld'}{'status'} || 'disabled'; |
258 |
-my $myauto = ${'automysqlbackup'}{'Mysql55'} || 'disabled'; |
259 |
-if ($my55 eq 'enabled' && $myauto eq 'enabled') { |
260 |
+if ($status eq 'enabled') { |
261 |
$OUT .= <<'_EOF'; |
262 |
CONFIG_mailcontent=$MAILCONTENT |
263 |
CONFIG_mail_maxattsize=$SIZEMAIL |
264 |
@@ -13,4 +11,4 @@ |
265 |
umask 0077 |
266 |
_EOF |
267 |
} |
268 |
-} |
269 |
\ Pas de fin de ligne à la fin du fichier |
270 |
+} |
271 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/10start smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/10start |
272 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/10start 2019-09-22 11:08:45.789000000 -0400 |
273 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/10start 2019-09-22 12:31:30.680000000 -0400 |
274 |
@@ -1,7 +1,9 @@ |
275 |
{ |
276 |
my $my57 = ${'mysql57-mysqld'}{'status'} || 'disabled'; |
277 |
-my $myauto = ${'automysqlbackup'}{'Mysql57'} || 'disabled'; |
278 |
-if ($my57 eq 'enabled' && $myauto eq 'enabled') { |
279 |
+my $myauto = ${'automysqlbackup'}{'Mysql57'} || 'enabled'; |
280 |
+our $status = ( $my57 eq 'enabled' && $myauto eq 'enabled' ) ? 'enabled' : 'disabled'; |
281 |
+ |
282 |
+if ($status eq 'enabled') { |
283 |
$OUT .= <<'_EOF'; |
284 |
#version=3.0_rc2 |
285 |
# DONT'T REMOVE THE PREVIOUS VERSION LINE! |
286 |
@@ -15,4 +17,4 @@ |
287 |
$OUT .= "# DONT'T REMOVE THE PREVIOUS VERSION LINE!\n"; |
288 |
$OUT .= "# Automysqlbackup disabled\n"; |
289 |
} |
290 |
-} |
291 |
\ Pas de fin de ligne à la fin du fichier |
292 |
+} |
293 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/20db smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/20db |
294 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/20db 2019-09-22 11:08:45.789000000 -0400 |
295 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/20db 2019-09-22 12:31:51.823000000 -0400 |
296 |
@@ -1,7 +1,5 @@ |
297 |
{ |
298 |
-my $my57 = ${'mysql57-mysqld'}{'status'} || 'disabled'; |
299 |
-my $myauto = ${'automysqlbackup'}{'Mysql57'} || 'disabled'; |
300 |
-if ($my57 eq 'enabled' && $myauto eq 'enabled') { |
301 |
+if ($status eq 'enabled') { |
302 |
$OUT .= <<'_EOF'; |
303 |
# DB Specific |
304 |
CONFIG_backup_dir=${BACKUPDIR}_mysql57 |
305 |
@@ -11,4 +9,4 @@ |
306 |
# End |
307 |
_EOF |
308 |
} |
309 |
-} |
310 |
\ Pas de fin de ligne à la fin du fichier |
311 |
+} |
312 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/30end smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/30end |
313 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/30end 2019-09-22 11:08:45.789000000 -0400 |
314 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/30end 2019-09-22 12:32:09.602000000 -0400 |
315 |
@@ -1,7 +1,5 @@ |
316 |
{ |
317 |
-my $my57 = ${'mysql57-mysqld'}{'status'} || 'disabled'; |
318 |
-my $myauto = ${'automysqlbackup'}{'Mysql57'} || 'disabled'; |
319 |
-if ($my57 eq 'enabled' && $myauto eq 'enabled') { |
320 |
+if ($status eq 'enabled') { |
321 |
$OUT .= <<'_EOF'; |
322 |
CONFIG_mailcontent=$MAILCONTENT |
323 |
CONFIG_mail_maxattsize=$SIZEMAIL |
324 |
@@ -13,4 +11,4 @@ |
325 |
umask 0077 |
326 |
_EOF |
327 |
} |
328 |
-} |
329 |
\ Pas de fin de ligne à la fin du fichier |
330 |
+} |
331 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/10base smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/10base |
332 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/10base 2019-09-22 11:08:45.789000000 -0400 |
333 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/10base 2019-09-22 11:47:34.746000000 -0400 |
334 |
@@ -1,9 +1,24 @@ |
335 |
{ |
336 |
-my $my53 = ${'mysqld'}{'status'} || 'disabled'; |
337 |
+my $my51 = ${'mysqld'}{'status'} || 'disabled'; |
338 |
+$my51 = ( ( ( ${'automysqlbackup'}{'Mysql51'} || 'enabled' ) eq "enabled" ) and ( $my51 eq "enabled" ) ) ? "enabled" : "disabled"; |
339 |
+my $my55 = ${'mysql55-mysqld'}{'status'} || 'disabled'; |
340 |
+$my55 = ( ( ( ${'automysqlbackup'}{'Mysql55'} || 'enabled' ) eq "enabled" ) and ( $my55 eq "enabled" ) ) ? "enabled" : "disabled"; |
341 |
+my $my57 = ${'mysql57-mysqld'}{'status'} || 'disabled'; |
342 |
+$my57 = ( ( ( ${'automysqlbackup'}{'Mysql57'} || 'enabled' ) eq "enabled" ) and ( $my57 eq "enabled" ) ) ? "enabled" : "disabled"; |
343 |
+my $mymaria = ${'mariadb55-mysqld'}{'status'} || 'disabled'; |
344 |
+$mymaria = ( ( ( ${'automysqlbackup'}{'Mymaria'} || 'enabled' ) eq "enabled" ) and ( $mymaria eq "enabled") ) ? "enabled" : "disabled"; |
345 |
|
346 |
-return '' unless $my53 eq 'enabled'; |
347 |
+return '' unless $my51 eq 'enabled'; |
348 |
my $minutes= ${'automysqlbackup'}{'Minute'}||'1'; |
349 |
my $hours= ${'automysqlbackup'}{'Hour'}||'3'; |
350 |
-$OUT = "$minutes $hours * * * root /sbin/e-smith/runmysqlbackup /etc/automysqlbackup/myserver.conf > /dev/null\n"; |
351 |
+$OUT = "$minutes $hours * * * root "; |
352 |
+ |
353 |
+$OUT .= "/sbin/e-smith/runmysqlbackup /etc/automysqlbackup/myserver.conf ' ' > /dev/null ; " if $my51 eq "enabled"; |
354 |
+$OUT .= "/sbin/e-smith/runmysqlbackup /etc/automysqlbackup/mysql55.conf '_mysql55' > /dev/null ; " if $my55 eq "enabled"; |
355 |
+$OUT .= "/sbin/e-smith/runmysqlbackup /etc/automysqlbackup/mysql57.conf '_mysql57' > /dev/null ; " if $my57 eq "enabled"; |
356 |
+$OUT .= "/sbin/e-smith/runmysqlbackup /etc/automysqlbackup/mymaria.conf '_mymaria' > /dev/null ; " if $mymaria eq "enabled"; |
357 |
+ |
358 |
+$OUT .= "\n"; |
359 |
+ |
360 |
+} |
361 |
|
362 |
-} |
363 |
\ Pas de fin de ligne à la fin du fichier |
364 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/20mysql55 smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/20mysql55 |
365 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/20mysql55 2019-09-22 11:08:45.789000000 -0400 |
366 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/20mysql55 1969-12-31 19:00:00.000000000 -0500 |
367 |
@@ -1,9 +0,0 @@ |
368 |
-{ |
369 |
-my $my55 = ${'mysql55-mysqld'}{'status'} || 'disabled'; |
370 |
- |
371 |
-return '' unless $my55 eq 'enabled'; |
372 |
-my $minutes= ${'automysqlbackup'}{'Minute'}||'1'; |
373 |
-my $hours= ${'automysqlbackup'}{'Hour'}||'3'; |
374 |
-$OUT = "$minutes $hours * * * root /sbin/e-smith/runmysqlbackup /etc/automysqlbackup/mysql55.conf > /dev/null\n"; |
375 |
- |
376 |
-} |
377 |
\ Pas de fin de ligne à la fin du fichier |
378 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/21mysql57 smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/21mysql57 |
379 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/21mysql57 2019-09-22 11:08:45.789000000 -0400 |
380 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/21mysql57 1969-12-31 19:00:00.000000000 -0500 |
381 |
@@ -1,9 +0,0 @@ |
382 |
-{ |
383 |
-my $my57 = ${'mysql57-mysqld'}{'status'} || 'disabled'; |
384 |
- |
385 |
-return '' unless $my57 eq 'enabled'; |
386 |
-my $minutes= ${'automysqlbackup'}{'Minute'}||'1'; |
387 |
-my $hours= ${'automysqlbackup'}{'Hour'}||'3'; |
388 |
-$OUT = "$minutes $hours * * * root /sbin/e-smith/runmysqlbackup /etc/automysqlbackup/mysql57.conf > /dev/null\n"; |
389 |
- |
390 |
-} |
391 |
\ Pas de fin de ligne à la fin du fichier |
392 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/22mymaria smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/22mymaria |
393 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/22mymaria 2019-09-22 11:08:45.790000000 -0400 |
394 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/22mymaria 1969-12-31 19:00:00.000000000 -0500 |
395 |
@@ -1,9 +0,0 @@ |
396 |
-{ |
397 |
-my $mymaria = ${'mariadb55-mysqld'}{'status'} || 'disabled'; |
398 |
- |
399 |
-return '' unless $mymaria eq 'enabled'; |
400 |
-my $minutes= ${'automysqlbackup'}{'Minute'}||'1'; |
401 |
-my $hours= ${'automysqlbackup'}{'Hour'}||'3'; |
402 |
-$OUT = "$minutes $hours * * * root /sbin/e-smith/runmysqlbackup /etc/automysqlbackup/mymaria.conf > /dev/null\n"; |
403 |
- |
404 |
-} |
405 |
\ Pas de fin de ligne à la fin du fichier |
406 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/e-smith/sql/init/automysqlbackup smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/e-smith/sql/init/automysqlbackup |
407 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/e-smith/sql/init/automysqlbackup 1969-12-31 19:00:00.000000000 -0500 |
408 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/e-smith/sql/init/automysqlbackup 2019-10-02 22:15:09.804000000 -0400 |
409 |
@@ -0,0 +1,37 @@ |
410 |
+{ |
411 |
+my $user = $automysqlbackup{'DbUser'} || 'backupuser'; |
412 |
+my $pass = $automysqlbackup{'DbPassword'} || 'automysqlbackup'; |
413 |
+my $status = ${'mysql55-mysqld'}{'status'} || 'disabled'; |
414 |
+ |
415 |
+$OUT = "#! /bin/sh |
416 |
+"; |
417 |
+ |
418 |
+if ( "$status" eq "enabled" ) { |
419 |
+ |
420 |
+$OUT .= <<"END"; |
421 |
+HOME="/root/"; |
422 |
+/opt/rh/mysql55/root/usr/bin/mysql --socket=/var/lib/mysql/mysql55.sock <<EOF |
423 |
+USE mysql; |
424 |
+ |
425 |
+REPLACE INTO user ( |
426 |
+ host, |
427 |
+ user, |
428 |
+ password) |
429 |
+ VALUES ( |
430 |
+ 'localhost', |
431 |
+ '$user', |
432 |
+ PASSWORD ('$pass')); |
433 |
+ |
434 |
+ |
435 |
+REVOKE ALL PRIVILEGES ON *.* FROM '$user'\@'localhost'; |
436 |
+REVOKE GRANT OPTION ON *.* FROM '$user'\@'localhost'; |
437 |
+GRANT EVENT,SELECT,LOCK TABLES, SHOW VIEW ON *.* TO '$user'\@'localhost' ; |
438 |
+ |
439 |
+ |
440 |
+FLUSH PRIVILEGES; |
441 |
+EOF |
442 |
+END |
443 |
+} |
444 |
+ |
445 |
+} |
446 |
+ |
447 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/e-smith/sql/init55/automysqlbackup smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/e-smith/sql/init55/automysqlbackup |
448 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/e-smith/sql/init55/automysqlbackup 1969-12-31 19:00:00.000000000 -0500 |
449 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/e-smith/sql/init55/automysqlbackup 2019-10-02 22:15:59.323000000 -0400 |
450 |
@@ -0,0 +1,37 @@ |
451 |
+{ |
452 |
+my $user = $automysqlbackup{'DbUser'} || 'backupuser'; |
453 |
+my $pass = $automysqlbackup{'DbPassword'} || 'automysqlbackup'; |
454 |
+my $status = ${'mysqld'}{'status'} || 'disabled'; |
455 |
+ |
456 |
+$OUT = "#! /bin/sh |
457 |
+"; |
458 |
+ |
459 |
+if ( "$status" eq "enabled" ) { |
460 |
+ |
461 |
+$OUT .= <<"END"; |
462 |
+HOME="/root/"; |
463 |
+/usr/bin/mysql --socket=/var/lib/mysql/mysql.sock <<EOF |
464 |
+USE mysql; |
465 |
+ |
466 |
+REPLACE INTO user ( |
467 |
+ host, |
468 |
+ user, |
469 |
+ password) |
470 |
+ VALUES ( |
471 |
+ 'localhost', |
472 |
+ '$user', |
473 |
+ PASSWORD ('$pass')); |
474 |
+ |
475 |
+ |
476 |
+REVOKE ALL PRIVILEGES ON *.* FROM '$user'\@'localhost'; |
477 |
+REVOKE GRANT OPTION ON *.* FROM '$user'\@'localhost'; |
478 |
+GRANT EVENT,SELECT,LOCK TABLES, SHOW VIEW ON *.* TO '$user'\@'localhost' ; |
479 |
+ |
480 |
+ |
481 |
+FLUSH PRIVILEGES; |
482 |
+EOF |
483 |
+END |
484 |
+} |
485 |
+ |
486 |
+} |
487 |
+ |
488 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/e-smith/sql/init57/automysqlbackup smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/e-smith/sql/init57/automysqlbackup |
489 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/e-smith/sql/init57/automysqlbackup 1969-12-31 19:00:00.000000000 -0500 |
490 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/e-smith/sql/init57/automysqlbackup 2019-10-02 22:13:28.624000000 -0400 |
491 |
@@ -0,0 +1,43 @@ |
492 |
+{ |
493 |
+my $user = $automysqlbackup{'DbUser'} || 'backupuser'; |
494 |
+my $pass = $automysqlbackup{'DbPassword'} || 'automysqlbackup'; |
495 |
+my $status = ${'mysql57-mysqld'}{'status'} || 'disabled'; |
496 |
+ |
497 |
+$OUT = "#! /bin/sh |
498 |
+"; |
499 |
+ |
500 |
+if ( "$status" eq "enabled" ) { |
501 |
+ |
502 |
+$OUT .= <<"END"; |
503 |
+HOME="/root/"; |
504 |
+/opt/rh/rh-mysql57/root/usr/bin/mysql --socket=/var/lib/mysql/mysql57.sock <<EOF |
505 |
+USE mysql; |
506 |
+ |
507 |
+REPLACE INTO user ( |
508 |
+ host, |
509 |
+ user, |
510 |
+ authentication_string, |
511 |
+ ssl_cipher, |
512 |
+ x509_issuer, |
513 |
+ x509_subject) |
514 |
+ VALUES ( |
515 |
+ 'localhost', |
516 |
+ '$user', |
517 |
+ PASSWORD ('$pass'), |
518 |
+ '', |
519 |
+ '', |
520 |
+ ''); |
521 |
+ |
522 |
+ |
523 |
+REVOKE ALL PRIVILEGES ON *.* FROM '$user'\@'localhost'; |
524 |
+REVOKE GRANT OPTION ON *.* FROM '$user'\@'localhost'; |
525 |
+GRANT EVENT,SELECT,LOCK TABLES, SHOW VIEW ON *.* TO '$user'\@'localhost' ; |
526 |
+ |
527 |
+ |
528 |
+FLUSH PRIVILEGES; |
529 |
+EOF |
530 |
+END |
531 |
+} |
532 |
+ |
533 |
+} |
534 |
+ |
535 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/automysqlbackup smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/automysqlbackup |
536 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/automysqlbackup 1969-12-31 19:00:00.000000000 -0500 |
537 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init/automysqlbackup 2019-10-02 22:14:48.327000000 -0400 |
538 |
@@ -0,0 +1 @@ |
539 |
+PERMS=0750 |
540 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init55/automysqlbackup smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init55/automysqlbackup |
541 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init55/automysqlbackup 1969-12-31 19:00:00.000000000 -0500 |
542 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init55/automysqlbackup 2019-10-02 22:00:38.421000000 -0400 |
543 |
@@ -0,0 +1 @@ |
544 |
+PERMS=0750 |
545 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init57/automysqlbackup smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init57/automysqlbackup |
546 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init57/automysqlbackup 1969-12-31 19:00:00.000000000 -0500 |
547 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates.metadata/etc/e-smith/sql/init57/automysqlbackup 2019-10-02 22:00:59.587000000 -0400 |
548 |
@@ -0,0 +1 @@ |
549 |
+PERMS=0750 |
550 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/sbin/e-smith/runmysqlbackup smeserver-automysqlbackup-3.0.RC6/root/sbin/e-smith/runmysqlbackup |
551 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/sbin/e-smith/runmysqlbackup 2019-09-22 11:08:45.797000000 -0400 |
552 |
+++ smeserver-automysqlbackup-3.0.RC6/root/sbin/e-smith/runmysqlbackup 2019-09-22 12:00:18.109000000 -0400 |
553 |
@@ -1,4 +1,4 @@ |
554 |
-#!/bin/sh |
555 |
+#!/bin/bash |
556 |
|
557 |
/usr/local/bin/automysqlbackup $1 >/dev/null |
558 |
|
559 |
@@ -8,6 +8,8 @@ |
560 |
DB="/root/backup/db"; |
561 |
fi |
562 |
|
563 |
-chown root:root $DB* -R |
564 |
-find $DB* -type f -exec chmod 400 {} \; |
565 |
-find $DB* -type d -exec chmod 700 {} \; |
566 |
+if [[ "$DB" =~ "^/root/backup" ]] || [[ "$DB" =~ "^/home/e-smith/db/" ]] ; then |
567 |
+ chown root:root $DB$2 -R |
568 |
+ find $DB$2 -type f -exec chmod 400 {} \; |
569 |
+ find $DB$2 -type d -exec chmod 700 {} \; |
570 |
+fi |
571 |
diff -Nur smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/20db smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/20db |
572 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/20db 2019-11-26 13:27:03.395000000 -0500 |
573 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mysql57.conf/20db 2019-11-26 13:30:23.571000000 -0500 |
574 |
@@ -4,7 +4,7 @@ |
575 |
# DB Specific |
576 |
CONFIG_backup_dir=${BACKUPDIR}_mysql57 |
577 |
CONFIG_mysql_dump_full_schema='no' |
578 |
-CONFIG_db_exclude=( 'performance_schema' 'sys' ) |
579 |
+CONFIG_db_exclude=( 'information_schema' 'performance_schema' 'sys' ) |
580 |
CONFIG_mysql_dump_socket='/var/lib/mysql/mysql57.sock' |
581 |
# End |
582 |
_EOF |