]> git.pld-linux.org Git - packages/cacti.git/blame - cacti-config.patch
Up to 1.2.26
[packages/cacti.git] / cacti-config.patch
CommitLineData
32a66222
AM
1--- cacti-1.2.26/include/global.php~ 2023-12-24 03:17:14.000000000 +0100
2+++ cacti-1.2.26/include/global.php 2024-02-28 13:34:23.293235210 +0100
3@@ -81,13 +81,7 @@ $disable_log_rotation = false;
4
7a13808f 5 $config = array();
caa81993 6
d848f153
AM
7-/* Include configuration, or use the defaults */
8-if (file_exists(dirname(__FILE__) . '/config.php')) {
7a13808f
AM
9- if (!is_readable(dirname(__FILE__) . '/config.php')) {
10- die('Configuration file include/config.php is present, but unreadable.' . PHP_EOL);
11- }
d848f153
AM
12- include(dirname(__FILE__) . '/config.php');
13-}
caa81993
ER
14+require '/etc/webapps/cacti/config.php';
15
81fd7803 16 if (isset($config['cacti_version'])) {
7a13808f 17 die('Invalid include/config.php file detected.' . PHP_EOL);
32a66222 18@@ -238,7 +232,7 @@ if ($config['cacti_server_os'] == 'win32
81fd7803 19 }
32a66222 20
81fd7803
AM
21 $config['include_path'] = dirname(__FILE__);
22-$config['rra_path'] = $config['base_path'] . '/rra';
219fa6fd 23+$config["rra_path"] = '/var/lib/cacti/rra';
6d075ceb 24
81fd7803
AM
25 /* for multiple pollers, we need to know this location */
26 if (!isset($scripts_path)) {
32a66222
AM
27--- cacti-1.2.26/include/config.php~ 2023-12-24 03:17:14.000000000 +0100
28+++ cacti-1.2.26/include/config.php 2024-02-28 13:35:19.813235204 +0100
29@@ -29,8 +29,8 @@
81fd7803
AM
30 $database_type = 'mysql';
31 $database_default = 'cacti';
32 $database_hostname = 'localhost';
33-$database_username = 'cactiuser';
34-$database_password = 'cactiuser';
35+$database_username = 'mysql';
36+$database_password = '';
37 $database_port = '3306';
32a66222 38 $database_retries = 5;
81fd7803 39 $database_ssl = false;
32a66222
AM
40--- cacti-1.2.26/poller.php~ 2023-12-24 03:17:14.000000000 +0100
41+++ cacti-1.2.26/poller.php 2024-02-28 13:36:02.066568538 +0100
42@@ -31,7 +31,7 @@ if (function_exists('pcntl_async_signals
81fd7803 43
32a66222 44 ini_set('output_buffering', 'Off');
6d075ceb 45
e90920b5
AM
46-require(__DIR__ . '/include/cli_check.php');
47+require('/usr/share/cacti/include/cli_check.php');
48 require_once($config['base_path'] . '/lib/poller.php');
49 require_once($config['base_path'] . '/lib/data_query.php');
50 require_once($config['base_path'] . '/lib/rrd.php');
3d449d4f
AM
51diff -ur cacti-1.2.6.org/install/functions.php cacti-1.2.6/install/functions.php
52--- cacti-1.2.6.org/install/functions.php 2019-09-02 10:23:43.000000000 +0200
53+++ cacti-1.2.6/install/functions.php 2019-09-26 11:19:59.780907049 +0200
54@@ -794,8 +794,8 @@
55 $section = 'general';
56 }
57 $logfile = 'install' . '-' . $section;
58- file_put_contents($config['base_path'] . '/log/' . $logfile . '.log', sprintf($format_log1, $day, $time, $levelname, $data, PHP_EOL), $flags);
59- file_put_contents($config['base_path'] . '/log/install-complete.log', sprintf($format_log2, $day, $time, $sectionname, $levelname, $data, PHP_EOL), $flags);
60+ file_put_contents('/var/log/cacti/' . $logfile . '.log', sprintf($format_log1, $day, $time, $levelname, $data, PHP_EOL), $flags);
61+ file_put_contents('/var/log/cacti/install-complete.log', sprintf($format_log2, $day, $time, $sectionname, $levelname, $data, PHP_EOL), $flags);
62 }
63 }
64
32a66222
AM
65--- cacti-1.2.26/lib/installer.php~ 2023-12-24 03:17:14.000000000 +0100
66+++ cacti-1.2.26/lib/installer.php 2024-02-28 13:37:29.589901867 +0100
67@@ -528,7 +528,6 @@ class Installer implements JsonSerializa
3d449d4f
AM
68
69 $always_paths = array(
32a66222
AM
70 'sys_temp' => sys_get_temp_dir(),
71- 'log' => $config['base_path'] . '/log',
72 'boost' => $config['base_path'] . '/cache/boost',
73 'mibcache' => $config['base_path'] . '/cache/mibcache',
74 'realtime' => $config['base_path'] . '/cache/realtime',
75@@ -3539,7 +3538,7 @@ class Installer implements JsonSerializa
3d449d4f
AM
76
77 $page_nr = 1;
32a66222 78 $total_rows = 500;
3d449d4f 79- $logcontents = tail_file($config['base_path'] . '/log/cacti.log', 100, -1, ' INSTALL:' , $page_nr, $total_rows);
32a66222 80+ $logcontents = tail_file('/var/log/cacti/cacti.log', 100, -1, ' INSTALL:' , $page_nr, $total_rows);
3d449d4f
AM
81
82 $output_log = '';
83 foreach ($logcontents as $logline) {
32a66222 84
This page took 0.171486 seconds and 5 git commands to generate.