1 |
brianr |
1.1 |
diff -urN smeserver-automysqlbackup-3.0.RC6.old/createlinks smeserver-automysqlbackup-3.0.RC6/createlinks |
2 |
|
|
--- smeserver-automysqlbackup-3.0.RC6.old/createlinks 2021-01-26 15:20:46.060189687 +0000 |
3 |
|
|
+++ smeserver-automysqlbackup-3.0.RC6/createlinks 2021-01-28 10:58:17.294751410 +0000 |
4 |
|
|
@@ -19,6 +19,7 @@ |
5 |
|
|
templates2events( |
6 |
|
|
"$_", qw( |
7 |
|
|
automysqlbackup-update |
8 |
|
|
+ smeserver-automysqlbackup-update |
9 |
|
|
console-save |
10 |
|
|
bootstrap-console-save |
11 |
|
|
) |
12 |
|
|
@@ -26,11 +27,15 @@ |
13 |
|
|
} |
14 |
|
|
|
15 |
|
|
# add action /etc/e-smith/events/actions/automysqlbackup to automysqlbackup-update bootstrap-console-save |
16 |
|
|
-foreach my $event (qw(automysqlbackup-update bootstrap-console-save)){ |
17 |
|
|
+foreach my $event (qw( automysqlbackup-update |
18 |
|
|
+ smeserver-automysqlbackup-update |
19 |
|
|
+ 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 |
|
|
+for my $event (qw( automysqlbackup-update |
26 |
|
|
+ smeserver-automysqlbackup-update |
27 |
|
|
+)){ |
28 |
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");; |
29 |
|
|
} |
30 |
|
|
diff -urN 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 |
31 |
|
|
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/events/actions/automysqlbackup 2021-01-26 15:20:46.061189696 +0000 |
32 |
|
|
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/events/actions/automysqlbackup 2021-01-28 10:19:37.353352275 +0000 |
33 |
|
|
@@ -3,23 +3,19 @@ |
34 |
|
|
|
35 |
|
|
|
36 |
|
|
#check if mysql55 is instelled and enabled, if yes expand sql/init55 and restar mysql55-mysql.init |
37 |
|
|
- |
38 |
|
|
-status55=`/sbin/e-smith/db configuration getprop mysql55-mysqld status|| echo "disabled"` |
39 |
|
|
- |
40 |
|
|
-if [ $status55 == "enabled" ]; then |
41 |
|
|
- |
42 |
|
|
- /sbin/e-smith/expand-template /etc/e-smith/sql/init55/automysqlbackup |
43 |
|
|
- /sbin/e-smith/service mysql55-mysql.init restart |
44 |
|
|
- |
45 |
|
|
-fi |
46 |
|
|
- |
47 |
|
|
+#status55=`/sbin/e-smith/db configuration getprop mysql55-mysqld status|| echo "disabled"` |
48 |
|
|
+#if [ $status55 == "enabled" ]; then |
49 |
|
|
+# /sbin/e-smith/expand-template /etc/e-smith/sql/init55/automysqlbackup |
50 |
|
|
+# /sbin/e-smith/service mysql55-mysql.init restart |
51 |
|
|
+#fi |
52 |
|
|
#check if mysql57 is installed and enabled, if yes expand sql/init57 and restar mysql57-mysql.init |
53 |
|
|
-status57=`/sbin/e-smith/db configuration getprop mysql57-mysqld status|| echo "disabled"` |
54 |
|
|
- |
55 |
|
|
-if [ $status57 == "enabled" ]; then |
56 |
|
|
- |
57 |
|
|
- /sbin/e-smith/expand-template /etc/e-smith/sql/init57/automysqlbackup |
58 |
|
|
- /sbin/e-smith/service mysql57-mysql.init restart |
59 |
|
|
+#status57=`/sbin/e-smith/db configuration getprop mysql57-mysqld status|| echo "disabled"` |
60 |
|
|
+#if [ $status57 == "enabled" ]; then |
61 |
|
|
+# /sbin/e-smith/expand-template /etc/e-smith/sql/init57/automysqlbackup |
62 |
|
|
+# /sbin/e-smith/service mysql57-mysql.init restart |
63 |
|
|
+#fi |
64 |
|
|
+# for SME10 MySQL is mariadb - no need for various options |
65 |
|
|
+ /sbin/e-smith/expand-template /etc/e-smith/sql/init/automysqlbackup |
66 |
|
|
+ /usr/bin/systemctl restart mysql.init |
67 |
|
|
|
68 |
|
|
-fi |
69 |
|
|
|
70 |
|
|
diff -urN 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 |
71 |
|
|
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/10start 2021-01-26 15:20:46.062189706 +0000 |
72 |
|
|
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/10start 2021-01-28 10:30:00.985316790 +0000 |
73 |
|
|
@@ -1,5 +1,5 @@ |
74 |
|
|
{ |
75 |
|
|
-my $mymaria = ${'mariadb55-mysqld'}{'status'} || 'disabled'; |
76 |
|
|
+my $mymaria = ${'mariadb'}{'status'} || 'disabled'; |
77 |
|
|
my $myauto = ${'automysqlbackup'}{'Mymaria'} || 'enabled'; |
78 |
|
|
our $status = ( $mymaria eq 'enabled' && $myauto eq 'enabled' ) ? 'enabled' : 'disabled'; |
79 |
|
|
|
80 |
|
|
diff -urN 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 |
81 |
|
|
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/e-smith/sql/init/automysqlbackup 2021-01-26 15:20:46.065189734 +0000 |
82 |
|
|
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/e-smith/sql/init/automysqlbackup 2021-01-26 16:38:28.466035572 +0000 |
83 |
|
|
@@ -1,7 +1,7 @@ |
84 |
|
|
{ |
85 |
|
|
my $user = $automysqlbackup{'DbUser'} || 'backupuser'; |
86 |
|
|
my $pass = $automysqlbackup{'DbPassword'} || 'automysqlbackup'; |
87 |
|
|
-my $status = ${'mysql55-mysqld'}{'status'} || 'disabled'; |
88 |
|
|
+my $status = ${'mysql.init'}{'status'} || 'disabled'; |
89 |
|
|
|
90 |
|
|
$OUT = "#! /bin/sh |
91 |
|
|
"; |
92 |
|
|
@@ -10,7 +10,7 @@ |
93 |
|
|
|
94 |
|
|
$OUT .= <<"END"; |
95 |
|
|
HOME="/root/"; |
96 |
|
|
-/opt/rh/mysql55/root/usr/bin/mysql --socket=/var/lib/mysql/mysql55.sock <<EOF |
97 |
|
|
+/usr/bin/mysql --socket=/var/lib/mysql/mysql.sock <<EOF |
98 |
|
|
USE mysql; |
99 |
|
|
|
100 |
|
|
REPLACE INTO user ( |