summaryrefslogtreecommitdiff
path: root/zabbix-config.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-08-22 07:42:22 +0000
committerCoprDistGit <infra@openeuler.org>2023-08-22 07:42:22 +0000
commitd516352a45d3bae02cdf2e45f911bf284160f4e2 (patch)
tree241e942c09addefcfa2fbce5bba6d4debfaa38d0 /zabbix-config.patch
parentf6d28d7c04688a8470e3652b1532006c2462cb21 (diff)
automatic import of zabbix
Diffstat (limited to 'zabbix-config.patch')
-rw-r--r--zabbix-config.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/zabbix-config.patch b/zabbix-config.patch
new file mode 100644
index 0000000..9d58fc6
--- /dev/null
+++ b/zabbix-config.patch
@@ -0,0 +1,45 @@
+diff -up zabbix-6.0.2/ui/include/classes/core/CConfigFile.php.config zabbix-6.0.2/ui/include/classes/core/CConfigFile.php
+--- zabbix-6.0.2/ui/include/classes/core/CConfigFile.php.config 2022-03-23 08:38:25.049013803 -0600
++++ zabbix-6.0.2/ui/include/classes/core/CConfigFile.php 2022-03-23 08:39:25.001657019 -0600
+@@ -25,7 +25,7 @@ class CConfigFile {
+ const CONFIG_ERROR = 2;
+ const CONFIG_VAULT_ERROR = 3;
+
+- const CONFIG_FILE_PATH = '/conf/zabbix.conf.php';
++ const CONFIG_FILE_PATH = '/etc/zabbix/web/zabbix.conf.php';
+
+ private static $supported_db_types = [
+ ZBX_DB_MYSQL => true,
+diff -up zabbix-6.0.2/ui/include/classes/core/ZBase.php.config zabbix-6.0.2/ui/include/classes/core/ZBase.php
+--- zabbix-6.0.2/ui/include/classes/core/ZBase.php.config 2022-03-14 03:57:00.000000000 -0600
++++ zabbix-6.0.2/ui/include/classes/core/ZBase.php 2022-03-23 08:38:25.052013836 -0600
+@@ -368,7 +368,7 @@ class ZBase {
+ * @throws Exception
+ */
+ protected function setMaintenanceMode() {
+- require_once 'conf/maintenance.inc.php';
++ require_once '/etc/zabbix/web/maintenance.inc.php';
+
+ if (defined('ZBX_DENY_GUI_ACCESS')) {
+ if (!isset($ZBX_GUI_ACCESS_IP_RANGE) || !in_array(CWebUser::getIp(), $ZBX_GUI_ACCESS_IP_RANGE)) {
+@@ -381,7 +381,7 @@ class ZBase {
+ * Load zabbix config file.
+ */
+ protected function loadConfigFile() {
+- $configFile = $this->getRootDir().CConfigFile::CONFIG_FILE_PATH;
++ $configFile = CConfigFile::CONFIG_FILE_PATH;
+ $config = new CConfigFile($configFile);
+ $this->config = $config->load();
+ }
+diff -up zabbix-6.0.2/ui/include/classes/setup/CSetupWizard.php.config zabbix-6.0.2/ui/include/classes/setup/CSetupWizard.php
+--- zabbix-6.0.2/ui/include/classes/setup/CSetupWizard.php.config 2022-03-14 03:57:00.000000000 -0600
++++ zabbix-6.0.2/ui/include/classes/setup/CSetupWizard.php 2022-03-23 08:38:25.054013857 -0600
+@@ -271,7 +271,7 @@ class CSetupWizard extends CForm {
+ // make zabbix.conf.php downloadable
+ header('Content-Type: application/x-httpd-php');
+ header('Content-Disposition: attachment; filename="'.basename(CConfigFile::CONFIG_FILE_PATH).'"');
+- $config = new CConfigFile(APP::getInstance()->getRootDir().CConfigFile::CONFIG_FILE_PATH);
++ $config = new CConfigFile(CConfigFile::CONFIG_FILE_PATH);
+ $config->config = [
+ 'DB' => [
+ 'TYPE' => $this->getConfig('DB_TYPE'),