This commit is contained in:
Mario Fetka 2019-07-26 16:52:04 +02:00
parent b1a159a343
commit 383cb25bc3
3 changed files with 0 additions and 117 deletions

View File

@ -1,103 +0,0 @@
diff -uNr nagiosql.orig/admin/settings.php nagiosql/admin/settings.php
--- nagiosql.orig/admin/settings.php 2017-10-20 15:00:09.000000000 +0200
+++ nagiosql/admin/settings.php 2017-10-20 15:26:23.004000000 +0200
@@ -92,8 +92,8 @@
}
}
// Write db settings to file
- if (is_writable($strBasePath."config/settings.php")) {
- $filSettings = fopen($strBasePath."config/settings.php","w");
+ if (is_writable("/etc/nagiosql/settings.php")) {
+ $filSettings = fopen("/etc/nagiosql/settings.php","w");
if ($filSettings) {
fwrite($filSettings,"<?php\n");
fwrite($filSettings,"exit;\n");
@@ -138,7 +138,7 @@
$myVisClass->processMessage(translate("An error occured while writing settings.php, please check permissions!"),$strErrorMessage);
}
} else {
- $myVisClass->processMessage($strBasePath."config/settings.php ".translate("is not writeable, please check permissions!"),$strErrorMessage);
+ $myVisClass->processMessage("/etc/nagiosql/settings.php ".translate("is not writeable, please check permissions!"),$strErrorMessage);
}
}
//
diff -uNr nagiosql.orig/admin/support.php nagiosql/admin/support.php
--- nagiosql.orig/admin/support.php 2017-10-20 15:00:09.000000000 +0200
+++ nagiosql/admin/support.php 2017-10-20 15:25:10.844000000 +0200
@@ -211,7 +211,7 @@
}
// File access checks
$conttp->setVariable("RW_CONFIG",translate("Read/Write access:")." settings.php");
-$strConfigFile = "../config/settings.php";
+$strConfigFile = "/etc/nagiosql/settings.php";
if (file_exists($strConfigFile) && is_readable($strConfigFile) && is_writable($strConfigFile)) {
$conttp->setVariable("RW_CONFIG_CLASS","checkgreen");
$conttp->setVariable("RW_CONFIG_RESULT",translate("ok"));
diff -uNr nagiosql.orig/functions/prepend_adm.php nagiosql/functions/prepend_adm.php
--- nagiosql.orig/functions/prepend_adm.php 2017-10-20 15:00:09.000000000 +0200
+++ nagiosql/functions/prepend_adm.php 2017-10-20 15:27:19.124000000 +0200
@@ -79,14 +79,14 @@
//
// Start installer
// ===============
-$preIniFile = $preBasePath.'config/settings.php';
+$preIniFile = '/etc/nagiosql/settings.php';
if (!file_exists($preIniFile) OR ! is_readable($preIniFile)) {
header("Location: ".$preBaseURL."install/index.php");
}
//
// Read file settings
// ==================
-$SETS = parse_ini_file($preBasePath.'config/settings.php',true);
+$SETS = parse_ini_file('/etc/nagiosql/settings.php',true);
if (!isset($_SESSION['SETS']['db'])) $_SESSION['SETS']['db'] = $SETS['db'];
//
// Include external function/class files - part 1
diff -uNr nagiosql.orig/functions/prepend_scripting.php nagiosql/functions/prepend_scripting.php
--- nagiosql.orig/functions/prepend_scripting.php 2017-10-20 15:00:09.000000000 +0200
+++ nagiosql/functions/prepend_scripting.php 2017-10-20 15:26:47.384000000 +0200
@@ -43,7 +43,7 @@
// Read settings file
// ==================
$preBasePath = str_replace("functions","",dirname(__FILE__));
-$preIniFile = $preBasePath.'config/settings.php';
+$preIniFile = '/etc/nagiosql/settings.php';
//
// Read file settings
// ==================
diff -uNr nagiosql.orig/install/functions/install_class.php nagiosql/install/functions/install_class.php
--- nagiosql.orig/install/functions/install_class.php 2017-10-20 15:00:09.000000000 +0200
+++ nagiosql/install/functions/install_class.php 2017-10-20 15:28:51.144000000 +0200
@@ -764,7 +764,7 @@
$strBasePath = substr(realpath('.'),0,-7);
$strE_ID = error_reporting();
error_reporting(0);
- $filSettings = fopen($strBasePath."config/settings.php","w");
+ $filSettings = fopen("/etc/nagiosql/settings.php","w");
error_reporting($strE_ID);
if ($filSettings) {
// Write Database Configuration into settings.php
diff -uNr nagiosql.orig/install/index.php nagiosql/install/index.php
--- nagiosql.orig/install/index.php 2017-10-20 15:00:09.000000000 +0200
+++ nagiosql/install/index.php 2017-10-20 15:27:52.532000000 +0200
@@ -22,7 +22,7 @@
$preContent = "templates/index.tpl.htm";
$preEncode = 'utf-8';
$preLocale = "../config/locale";
-$filConfig = "../config/settings.php";
+$filConfig = "/etc/nagiosql/settings.php";
$preDBType = "mysql";
$strLangOpt = "";
$strVersion = "3.3.0";
diff -uNr nagiosql.orig/install/step1.php nagiosql/install/step1.php
--- nagiosql.orig/install/step1.php 2017-10-20 15:00:09.000000000 +0200
+++ nagiosql/install/step1.php 2017-10-20 15:28:25.108000000 +0200
@@ -199,7 +199,7 @@
}
$arrTemplate['CHECK_5_CONTENT_1'] = $strHTML;
// File access checks
-$strConfigFile = "../config/settings.php";
+$strConfigFile = "/etc/nagiosql/settings.php";
if (file_exists($strConfigFile) && is_readable($strConfigFile)) {
$arrTemplate['CHECK_6_CONTENT_1'] = $strHTMLPart1.$myInstClass->translate("Read test on settings file (config/settings.php)").$strHTMLPart4.$myInstClass->translate("OK")."</span><br>\n";
} else if (file_exists($strConfigFile)&& !is_readable($strConfigFile)) {

View File

@ -1,12 +0,0 @@
diff -uNr nagiosql32.orig/install/sql/nagiosQL_v32_db_mysql.sql nagiosql32/install/sql/nagiosQL_v32_db_mysql.sql
--- nagiosql32.orig/install/sql/nagiosQL_v32_db_mysql.sql 2012-03-01 12:24:44.682770000 +0100
+++ nagiosql32/install/sql/nagiosQL_v32_db_mysql.sql 2017-05-20 20:31:30.760000000 +0200
@@ -83,7 +83,7 @@
-- Datasets for table `tbl_configtarget`
--
-INSERT INTO `tbl_configtarget` (`id`, `target`, `alias`, `server`, `method`, `user`, `password`, `ssh_key_path`, `basedir`, `hostconfig`, `serviceconfig`, `backupdir`, `hostbackup`, `servicebackup`, `nagiosbasedir`, `importdir`, `picturedir`, `commandfile`, `binaryfile`, `pidfile`, `conffile`, `version`, `access_group`, `active`, `nodelete`, `last_modified`) VALUES(1, 'localhost', 'Local installation', 'localhost', '1', '', '', '', '/etc/nagiosql/', '/etc/nagiosql/hosts/', '/etc/nagiosql/services/', '/etc/nagiosql/backup/', '/etc/nagiosql/backup/hosts/', '/etc/nagiosql/backup/services/', '/etc/nagiosql/', '/opt/nagios/etc/objects/', '', '/var/nagios/rw/nagios.cmd', '/opt/nagios/bin/nagios', '/var/nagios/nagios.lock', '/etc/nagiosql/nagios.cfg', 3, 0, '1', '1', NOW());
+INSERT INTO `tbl_configtarget` (`id`, `target`, `alias`, `server`, `method`, `user`, `password`, `ssh_key_path`, `basedir`, `hostconfig`, `serviceconfig`, `backupdir`, `hostbackup`, `servicebackup`, `nagiosbasedir`, `importdir`, `picturedir`, `commandfile`, `binaryfile`, `pidfile`, `conffile`, `version`, `access_group`, `active`, `nodelete`, `last_modified`) VALUES(1, 'localhost', 'Local installation', 'localhost', '1', '', '', '', '/etc/nagiosql/domain/', '/etc/nagiosql/domain/hosts/', '/etc/nagiosql/domain/services/', '/etc/nagiosql/backup/', '/etc/nagiosql/backup/hosts/', '/etc/nagiosql/backup/services/', '/etc/nagiosql/', '/etc/nagios4/objects/', '', '/var/lib/nagios4/rw/nagios.cmd', '/usr/sbin/nagios4', '/var/run/nagios4/nagios4.pid', '/etc/nagios4/nagios.cfg', 3, 0, '1', '1', NOW());
-- --------------------------------------------------------

View File

@ -1,2 +0,0 @@
40_settings_php.patch
50_nagios4_debian_pathes.patch