diff -urN smeserver-zabbix-server-0.1.old/createlinks smeserver-zabbix-server-0.1/createlinks --- smeserver-zabbix-server-0.1.old/createlinks 2021-11-01 10:33:22.030037529 +0000 +++ smeserver-zabbix-server-0.1/createlinks 2021-11-01 15:38:51.326745050 +0000 @@ -8,6 +8,8 @@ templates2events("/etc/httpd/conf/httpd.conf", $event); templates2events("/etc/zabbix/zabbix_server.conf", qw(zabbix-server-update bootstrap-console-save)); templates2events("/etc/zabbix/zabbix.conf.php", qw(zabbix-server-update bootstrap-console-save)); + + # new path with zabbix 4.4.6 templates2events("/etc/zabbix/web/zabbix.conf.php", qw(zabbix-server-update bootstrap-console-save)); templates2events("/etc/sudoers", $event); @@ -48,12 +50,13 @@ /etc/zabbix/zabbix_server.conf /usr/share/zabbix/.user.ini /etc/systemd/system-preset/49-koozali.preset + /etc/opt/remi/php74/php-fpm.d/www.conf )); event_services("$contrib-update", qw( httpd-e-smith sigusr1 - php-fpm reload + php74-php-fpm reload zabbix-server start )); diff -urN 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 --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web 2021-11-01 10:33:22.023037463 +0000 +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98zabbix-web 2021-11-01 15:28:12.969402319 +0000 @@ -20,7 +20,7 @@ Options FollowSymLinks - SetHandler "proxy:unix:/var/run/php-fpm/php$version.sock|fcgi://localhost" + SetHandler "proxy:unix:/var/run/php-fpm/php74-zabbix-server.sock|fcgi://localhost" #AddType application/x-httpd-php .php diff -urN 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 --- smeserver-zabbix-server-0.1.old/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20zabbix-server 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-zabbix-server-0.1/root/etc/e-smith/templates/etc/php-fpm.d/www.conf/20zabbix-server 2021-11-02 19:12:00.318845608 +0000 @@ -0,0 +1,56 @@ +{ +if ($PHP_VERSION eq '74'){ + if ((${'zabbix-server'}{status} || 'disabled') eq 'enabled'){ + my $id = 'zabbix-server'; + my $openbasedir = '/usr/share/zabbix:/var/cache/zabbix/:/var/run/php-fpm/:/var/lib/php/zabbix/' . + ':/var/lock/zabbix/:/etc/zabbix/:/usr/share/php/:/usr/share/pear/:/opt/remi/php74/root/usr/share/pear/' . + ':/opt/remi/php74/root/usr/share/php/'; + $disablefunctions = 'system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, ' . + 'escapeshellarg, escapeshellcmd'; + + $OUT .=<<_EOF; + +[php$PHP_VERSION-$id] +user = www +group = www +listen.owner = root +listen.group = www +listen.mode = 0660 +listen = /var/run/php-fpm/php$PHP_VERSION-$id.sock +pm = dynamic +pm.max_children = 15 +pm.start_servers = 3 +pm.min_spare_servers = 3 +pm.max_spare_servers = 4 +pm.max_requests = 1000 +request_terminate_timeout = 30 +php_admin_value[session.save_path] = /var/lib/php/zabbix/session +php_admin_value[opcache.file_cache] = /var/lib/php/zabbix/opcache +php_admin_value[upload_tmp_dir] = /var/lib/php/zabbix/tmp +php_admin_value[error_log] = /var/log/php/zabbix/error.log +slowlog = /var/log/php/zabbix/slow.log +php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f php@{ $DomainName } +php_admin_flag[display_errors] = off +php_admin_flag[log_errors] = on +php_admin_value[error_log] = syslog +php_admin_value[memory_limit] = 256M +php_admin_value[max_execution_time] = 600 +php_admin_value[max_input_time] = 600 +php_admin_value[post_max_size] = 32M +php_admin_value[upload_max_filesize] = 16M +php_admin_value[disable_functions] = $disablefunctions; +php_admin_value[open_basedir] = $openbasedir; +php_admin_flag[allow_url_fopen] = on +php_admin_flag[file_upload] = off +php_admin_flag[session.cookie_httponly] = on +php_admin_flag[allow_url_include] = off +php_admin_value[session.save_handler] = files +php_admin_value[always_populate_raw_post_data] = -1 + +_EOF + } + else{ + $OUT .= '; Zabbix Server is disabled'; + } +} +}