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();
