File: config_frontend-conffile-in-etc.patch

package info (click to toggle)
zabbix 1%3A7.0.10%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 272,688 kB
  • sloc: sql: 946,050; ansic: 389,440; php: 292,698; javascript: 83,388; sh: 5,680; makefile: 3,285; java: 1,420; cpp: 694; perl: 64; xml: 56
file content (56 lines) | stat: -rw-r--r-- 1,956 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Last-Update: 2016-02-13
Forwarded: not-needed
Author: Christoph Haas <haas@debian.org>
Reviewed-By: Dmitry Smirnov <onlyjob@member.fsf.org>
Description: Make Zabbix put its generated config file into /etc/zabbix

--- a/ui/include/classes/core/CConfigFile.php
+++ b/ui/include/classes/core/CConfigFile.php
@@ -19,9 +19,9 @@
 	const CONFIG_NOT_FOUND = 1;
 	const CONFIG_ERROR = 2;
 	const CONFIG_VAULT_ERROR = 3;
 
-	const CONFIG_FILE_PATH = '/conf/zabbix.conf.php';
+	const CONFIG_FILE_PATH = '/etc/zabbix/zabbix.conf.php';
 
 	private static $supported_db_types = [
 		ZBX_DB_MYSQL => true,
 		ZBX_DB_ORACLE => true,
--- a/ui/include/classes/setup/CSetupWizard.php
+++ b/ui/include/classes/setup/CSetupWizard.php
@@ -342,9 +342,9 @@
 
 				// 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::getRootDir().CConfigFile::CONFIG_FILE_PATH);
+				$config = new CConfigFile(CConfigFile::CONFIG_FILE_PATH);
 				$config->config = [
 					'DB' => [
 						'TYPE' => $this->getConfig('DB_TYPE'),
 						'SERVER' => $this->getConfig('DB_SERVER'),
@@ -1047,9 +1047,9 @@
 		$this->dbClose();
 
 		$this->setConfig('ZBX_CONFIG_FILE_CORRECT', true);
 
-		$config_file_name = APP::getRootDir().CConfigFile::CONFIG_FILE_PATH;
+		$config_file_name = CConfigFile::CONFIG_FILE_PATH;
 		$config = new CConfigFile($config_file_name);
 		$config->config = [
 			'DB' => [
 				'TYPE' => $this->getConfig('DB_TYPE'),
--- a/ui/include/classes/core/ZBase.php
+++ b/ui/include/classes/core/ZBase.php
@@ -404,9 +404,9 @@
 	/**
 	 * Load zabbix config file.
 	 */
 	protected function loadConfigFile(): void {
-		$configFile = $this->root_dir.CConfigFile::CONFIG_FILE_PATH;
+		$configFile = CConfigFile::CONFIG_FILE_PATH;
 
 		$config = new CConfigFile($configFile);
 
 		$this->config = $config->load();