/[smecontribs]/rpms/smeserver-zabbix-server/contribs10/smeserver-zabbix-server-0.1-z50.patch
ViewVC logotype

Diff of /rpms/smeserver-zabbix-server/contribs10/smeserver-zabbix-server-0.1-z50.patch

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

Revision 1.2 by jpp, Sun Dec 11 03:04:05 2022 UTC Revision 1.3 by jpp, Sun Dec 11 07:04:10 2022 UTC
# Line 155  diff -Nur --no-dereference smeserver-zab Line 155  diff -Nur --no-dereference smeserver-zab
155  -}  -}
156  diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init105/80zabbix-server smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init105/80zabbix-server  diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init105/80zabbix-server smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init105/80zabbix-server
157  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init105/80zabbix-server  1969-12-31 19:00:00.000000000 -0500  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/e-smith/sql/init105/80zabbix-server  1969-12-31 19:00:00.000000000 -0500
158  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init105/80zabbix-server      2022-12-10 21:48:11.872000000 -0500  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/e-smith/sql/init105/80zabbix-server      2022-12-11 02:02:45.993000000 -0500
159  @@ -0,0 +1,70 @@  @@ -0,0 +1,73 @@
160  +{  +{
161  +my $db = ${'zabbix-server'}{'DbName'} || 'zabbixdb';  +my $db = ${'zabbix-server'}{'DbName'} || 'zabbixdb';
162  +my $user = ${'zabbix-server'}{'DbUser'} || 'zabbixuser';  +my $user = ${'zabbix-server'}{'DbUser'} || 'zabbixuser';
# Line 167  diff -Nur --no-dereference smeserver-zab Line 167  diff -Nur --no-dereference smeserver-zab
167  +my $curcharset=  ( -d "/var/lib/mysql/$db" ) ? `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/'` : "utf8";  +my $curcharset=  ( -d "/var/lib/mysql/$db" ) ? `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/'` : "utf8";
168  +chomp $curcharset;  +chomp $curcharset;
169  +my $adminpass= ${'zabbix-server'}{'AdminPassword'} || 'zabbix';  +my $adminpass= ${'zabbix-server'}{'AdminPassword'} || 'zabbix';
170  +  +$hashpass=`/usr/bin/htpasswd -bnBC 10 '' $adminpass | tr -d ':'`;
171    +$hashpass =~ tr/\r\n//d;
172    +$version = `/bin/ls -d /usr/share/doc/zabbix-web*|grep -Eo '[0-9.]+\$'|cut -d. -f1 || echo 4 `;
173    +$modpass=($version > 4)? "update users set passwd='$hashpass' where alias='Admin';": "#$version";
174  +$OUT .= <<"END";  +$OUT .= <<"END";
175  +#! /bin/sh  +#! /bin/sh
 +#if [ -d /var/lib/mysql/$db ]; then  
176  +if [ -d /var/opt/rh/rh-mariadb105/lib/mysql/$db ]; then  +if [ -d /var/opt/rh/rh-mariadb105/lib/mysql/$db ]; then
177  +       # check if utf8  +       # check if utf8
178  +        if [[ "$curcharset" != "utf8" ]] ;then  +        if [[ "$curcharset" != "utf8" ]] ;then
# Line 190  diff -Nur --no-dereference smeserver-zab Line 192  diff -Nur --no-dereference smeserver-zab
192  +/usr/bin/mysql105 <<EOF  +/usr/bin/mysql105 <<EOF
193  +USE $db;  +USE $db;
194  +update users set passwd=md5('$adminpass') where alias='Admin' and passwd=md5('zabbix');  +update users set passwd=md5('$adminpass') where alias='Admin' and passwd=md5('zabbix');
195    +$modpass
196  +EOF  +EOF
197  +  +
198  +  +
# Line 227  diff -Nur --no-dereference smeserver-zab Line 230  diff -Nur --no-dereference smeserver-zab
230  +EOF  +EOF
231  +END  +END
232  +}  +}
233  diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/zabbix/zabbix.conf.php/10database smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix.conf.php/10database  diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20zabbix-server smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20zabbix-server
234  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/zabbix/zabbix.conf.php/10database    2009-02-02 22:01:01.000000000 -0500  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20zabbix-server   2022-12-10 02:37:45.009000000 -0500
235  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix.conf.php/10database        2022-12-10 22:03:00.362000000 -0500  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20zabbix-server       2022-12-11 00:10:00.668000000 -0500
236  @@ -1,7 +1,7 @@  @@ -8,6 +8,8 @@
237   global $DB;       $disablefunctions = 'system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, ' .
238                 'escapeshellarg, escapeshellcmd';
239    
240    +$socket = ( -d "/var/lib/mysql/zabbixdb") ? "/var/lib/mysql/mysql.sock" : "/var/lib/mysql/mariadb105.sock";
241    +
242         $OUT .=<<_EOF;
243    
244   $DB["TYPE"]             = "MYSQL";   [php$PHP_VERSION-$id]
245  -$DB["SERVER"]           = "localhost";  @@ -38,14 +40,16 @@
246  +$DB["SERVER"]           = "{$OUT = ( -d "/var/lib/mysql/zabbixdb") ? "localhost" : "localhost:/var/lib/mysql/mariadb105.sock"}";   php_admin_value[max_input_time] = 600
247   $DB["PORT"]             = "0";   php_admin_value[post_max_size] = 32M
248     php_admin_value[upload_max_filesize] = 16M
249    -php_admin_value[disable_functions] = $disablefunctions;
250    -php_admin_value[open_basedir] = $openbasedir;
251    +php_admin_value[disable_functions] = $disablefunctions
252    +php_admin_value[open_basedir] = $openbasedir
253     php_admin_flag[allow_url_fopen] = on
254     php_admin_flag[file_upload] = off
255     php_admin_flag[session.cookie_httponly] = on
256     php_admin_flag[allow_url_include] = off
257     php_admin_value[session.save_handler] = files
258     php_admin_value[always_populate_raw_post_data] = -1
259    +php_value[mysqli.default_socket] = $socket
260    +php_value[mysql.default_socket] = $socket
261    
262   {   _EOF
263       }
264  diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/zabbix/zabbix_server.conf/80database smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_server.conf/80database  diff -Nur --no-dereference smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/zabbix/zabbix_server.conf/80database smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_server.conf/80database
265  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/zabbix/zabbix_server.conf/80database 2022-12-10 02:37:44.939000000 -0500  --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/zabbix/zabbix_server.conf/80database 2022-12-10 02:37:44.939000000 -0500
266  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_server.conf/80database     2022-12-10 21:28:53.268000000 -0500  +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/zabbix/zabbix_server.conf/80database     2022-12-10 21:28:53.268000000 -0500


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