/[smecontribs]/rpms/smeserver-zabbix-server/contribs9/smeserver-zabbix-server-0.1-zabbix4.4.6.patch
ViewVC logotype

Diff of /rpms/smeserver-zabbix-server/contribs9/smeserver-zabbix-server-0.1-zabbix4.4.6.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by jpp, Sun May 10 07:10:04 2020 UTC Revision 1.4 by jpp, Thu May 14 02:21:50 2020 UTC
# Line 1  Line 1 
1  diff -Nur smeserver-zabbix-server-0.1.old/createlinks smeserver-zabbix-server-0.1/createlinks  diff -Nur smeserver-zabbix-server-0.1.old/createlinks smeserver-zabbix-server-0.1/createlinks
2  --- smeserver-zabbix-server-0.1.old/createlinks 2020-05-10 01:38:01.417000000 -0400  --- smeserver-zabbix-server-0.1.old/createlinks 2020-05-13 22:05:14.431000000 -0400
3  +++ smeserver-zabbix-server-0.1/createlinks     2020-05-10 03:07:02.122000000 -0400  +++ smeserver-zabbix-server-0.1/createlinks     2020-05-13 22:18:11.840000000 -0400
4  @@ -15,10 +15,11 @@  @@ -8,6 +8,8 @@
5     templates2events("/etc/httpd/conf/httpd.conf", $event);
6     templates2events("/etc/zabbix/zabbix_server.conf", qw(zabbix-server-update bootstrap-console-save));
7     templates2events("/etc/zabbix/zabbix.conf.php", qw(zabbix-server-update bootstrap-console-save));
8    +# new path with zabbix 4.4.6
9    +templates2events("/etc/zabbix/web/zabbix.conf.php", qw(zabbix-server-update bootstrap-console-save));
10     templates2events("/etc/sudoers", $event);
11     templates2events("/var/lib/zabbix/bin/sendxmpp", $event);
12     templates2events("/var/lib/zabbix/.sendxmpprc", $event);
13    @@ -15,10 +17,11 @@
14   templates2events("/etc/rc.d/init.d/masq", $event);   templates2events("/etc/rc.d/init.d/masq", $event);
15    
16   # Services to restart   # Services to restart
# Line 16  diff -Nur smeserver-zabbix-server-0.1.ol Line 25  diff -Nur smeserver-zabbix-server-0.1.ol
25   safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/etc/zabbix/zabbix.conf.php/template-begin");   safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/etc/zabbix/zabbix.conf.php/template-begin");
26  diff -Nur smeserver-zabbix-server-0.1.old/root/etc/e-smith/events/actions/zabbix-server smeserver-zabbix-server-0.1/root/etc/e-smith/events/actions/zabbix-server  diff -Nur smeserver-zabbix-server-0.1.old/root/etc/e-smith/events/actions/zabbix-server smeserver-zabbix-server-0.1/root/etc/e-smith/events/actions/zabbix-server
27  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/events/actions/zabbix-server       1969-12-31 19:00:00.000000000 -0500  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/events/actions/zabbix-server       1969-12-31 19:00:00.000000000 -0500
28  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/events/actions/zabbix-server   2020-05-10 03:05:06.278000000 -0400  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/events/actions/zabbix-server   2020-05-13 22:05:54.925000000 -0400
29  @@ -0,0 +1,7 @@  @@ -0,0 +1,7 @@
30  +#!/bin/bash  +#!/bin/bash
31  +# restart mysql.init  +# restart mysql.init
# Line 26  diff -Nur smeserver-zabbix-server-0.1.ol Line 35  diff -Nur smeserver-zabbix-server-0.1.ol
35  +exit 0  +exit 0
36  +  +
37  diff -Nur smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server  diff -Nur smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server
38  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server     2020-05-10 01:38:01.438000000 -0400  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server     2020-05-13 22:05:14.450000000 -0400
39  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server 2020-05-10 02:48:12.255000000 -0400  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init/80zabbix-server 2020-05-13 22:07:18.871000000 -0400
40  @@ -3,13 +3,8 @@  @@ -1,27 +1,30 @@
41   my $user = ${'zabbix-server'}{'DbUser'} || 'zabbix';   {
42    -my $db = ${'zabbix-server'}{'DbName'} || 'zabbix';
43    -my $user = ${'zabbix-server'}{'DbUser'} || 'zabbix';
44    +my $db = ${'zabbix-server'}{'DbName'} || 'zabbixdb';
45    +my $user = ${'zabbix-server'}{'DbUser'} || 'zabbixuser';
46   my $pass = ${'zabbix-server'}{'DbPassword'} || 'secret';   my $pass = ${'zabbix-server'}{'DbPassword'} || 'secret';
47    
48  -my $schema = `rpm -qd zabbix-server-mysql | grep schema | grep mysql`;  -my $schema = `rpm -qd zabbix-server-mysql | grep schema | grep mysql`;
# Line 40  diff -Nur smeserver-zabbix-server-0.1.ol Line 53  diff -Nur smeserver-zabbix-server-0.1.ol
53  -$images = `rpm -qd zabbix-server | grep mysql |grep images` if $images eq '';  -$images = `rpm -qd zabbix-server | grep mysql |grep images` if $images eq '';
54  -  -
55  +my $schema = `rpm -qd zabbix-server-mysql | grep create`;  +my $schema = `rpm -qd zabbix-server-mysql | grep create`;
56  +chomp $schema  +chomp $schema;
57    +my $curcharset=`echo 'show variables like "character_set_database";'|mysql $db|grep character_set_database|sed -r  's/^character_set_database\\s*([a-zA-Z0-9_-]+)/\\1/'`;
58    +chomp $curcharset;
59    
60   $OUT .= <<"END";   $OUT .= <<"END";
61   #! /bin/sh   #! /bin/sh
62  @@ -18,10 +13,9 @@   if [ -d /var/lib/mysql/$db ]; then
63    -       for P in \$(rpm -qd zabbix-server | grep dbpatch | grep mysql); do
64    +
65    +       # check if utf8
66    +        if [[ "$curcharset" != "utf8" ]] ;then
67    +                echo "ALTER DATABASE $db CHARACTER SET utf8 COLLATE utf8_bin;" |/usr/bin/mysql
68    +                echo 'ALTER TABLE `$db`.`problem_tag` DROP INDEX `problem_tag_1`, ADD INDEX `problem_tag_1` (`eventid`, `tag` (100), `value`(100));' |mysql
69    +                mysql --batch --skip-column-names --execute 'select concat("alter table ",TABLE_SCHEMA,".",TABLE_NAME," CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;") from information_schema.TABLES where TABLE_SCHEMA="$db"' |mysql
70    +        fi
71    +       for P in \$(rpm -qd zabbix-server-mysql | grep dbpatch | grep mysql); do
72                  /usr/bin/mysql $db < \$P                  /usr/bin/mysql $db < \$P
73          done          done
74   else   else
# Line 59  diff -Nur smeserver-zabbix-server-0.1.ol Line 83  diff -Nur smeserver-zabbix-server-0.1.ol
83    
84   /usr/bin/mysql <<EOF   /usr/bin/mysql <<EOF
85  diff -Nur smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web  diff -Nur smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web
86  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web   2020-05-10 01:38:01.436000000 -0400  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web   2020-05-13 22:05:14.446000000 -0400
87  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web       2020-05-10 02:47:42.612000000 -0400  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web       2020-05-13 22:05:54.925000000 -0400
88  @@ -24,6 +24,7 @@  @@ -24,6 +24,7 @@
89       php_admin_value memory_limit 256M       php_admin_value memory_limit 256M
90       php_admin_value date.timezone $tz       php_admin_value date.timezone $tz
# Line 69  diff -Nur smeserver-zabbix-server-0.1.ol Line 93  diff -Nur smeserver-zabbix-server-0.1.ol
93       AllowOverride None       AllowOverride None
94       Order allow,deny       Order allow,deny
95       Allow from $access       Allow from $access
96    diff -Nur smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates.metadata/etc/zabbix/web/zabbix.conf.php smeserver-zabbix-server-0.1/root/etc/e-smith/templates.metadata/etc/zabbix/web/zabbix.conf.php
97    --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates.metadata/etc/zabbix/web/zabbix.conf.php  1969-12-31 19:00:00.000000000 -0500
98    +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates.metadata/etc/zabbix/web/zabbix.conf.php      2020-05-13 22:15:54.659000000 -0400
99    @@ -0,0 +1,3 @@
100    +TEMPLATE_PATH="/etc/zabbix/zabbix.conf.php"
101    +OUTPUT_FILENAME="/etc/zabbix/web/zabbix.conf.php"
102    +


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed