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/automysqlbackup/mymaria.conf/20db smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/20db |
81 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/20db 2021-01-26 15:20:46.062189706 +0000 |
82 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/automysqlbackup/mymaria.conf/20db 2021-01-28 12:21:23.087965937 +0000 |
83 |
@@ -5,7 +5,7 @@ |
84 |
CONFIG_backup_dir=${BACKUPDIR}_mymaria |
85 |
CONFIG_mysql_dump_full_schema='no' |
86 |
CONFIG_db_exclude=( 'performance_schema' 'sys' ) |
87 |
-CONFIG_mysql_dump_socket='/var/lib/mysql/mariadb55.sock' |
88 |
+CONFIG_mysql_dump_socket='/var/lib/mysql/mysql.sock' |
89 |
# End |
90 |
_EOF |
91 |
} |
92 |
diff -urN 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 |
93 |
--- smeserver-automysqlbackup-3.0.RC6.old/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/10base 2021-01-26 15:20:46.064189724 +0000 |
94 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/cron.d/runmysqlbackup/10base 2021-01-28 12:07:01.492664756 +0000 |
95 |
@@ -5,10 +5,10 @@ |
96 |
$my55 = ( ( ( ${'automysqlbackup'}{'Mysql55'} || 'enabled' ) eq "enabled" ) and ( $my55 eq "enabled" ) ) ? "enabled" : "disabled"; |
97 |
my $my57 = ${'mysql57-mysqld'}{'status'} || 'disabled'; |
98 |
$my57 = ( ( ( ${'automysqlbackup'}{'Mysql57'} || 'enabled' ) eq "enabled" ) and ( $my57 eq "enabled" ) ) ? "enabled" : "disabled"; |
99 |
-my $mymaria = ${'mariadb55-mysqld'}{'status'} || 'disabled'; |
100 |
+my $mymaria = ${'mariadb'}{'status'} || 'disabled'; |
101 |
$mymaria = ( ( ( ${'automysqlbackup'}{'Mymaria'} || 'enabled' ) eq "enabled" ) and ( $mymaria eq "enabled") ) ? "enabled" : "disabled"; |
102 |
|
103 |
-return '' unless $my51 eq 'enabled'; |
104 |
+#return '' unless $my51 eq 'enabled'; |
105 |
my $minutes= ${'automysqlbackup'}{'Minute'}||'1'; |
106 |
my $hours= ${'automysqlbackup'}{'Hour'}||'3'; |
107 |
$OUT = "$minutes $hours * * * root "; |
108 |
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 |
109 |
--- 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 |
110 |
+++ smeserver-automysqlbackup-3.0.RC6/root/etc/e-smith/templates/etc/e-smith/sql/init/automysqlbackup 2021-01-26 16:38:28.466035572 +0000 |
111 |
@@ -1,7 +1,7 @@ |
112 |
{ |
113 |
my $user = $automysqlbackup{'DbUser'} || 'backupuser'; |
114 |
my $pass = $automysqlbackup{'DbPassword'} || 'automysqlbackup'; |
115 |
-my $status = ${'mysql55-mysqld'}{'status'} || 'disabled'; |
116 |
+my $status = ${'mysql.init'}{'status'} || 'disabled'; |
117 |
|
118 |
$OUT = "#! /bin/sh |
119 |
"; |
120 |
@@ -10,7 +10,7 @@ |
121 |
|
122 |
$OUT .= <<"END"; |
123 |
HOME="/root/"; |
124 |
-/opt/rh/mysql55/root/usr/bin/mysql --socket=/var/lib/mysql/mysql55.sock <<EOF |
125 |
+/usr/bin/mysql --socket=/var/lib/mysql/mysql.sock <<EOF |
126 |
USE mysql; |
127 |
|
128 |
REPLACE INTO user ( |