]>
Commit | Line | Data |
---|---|---|
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 | ||
5 | $config = array(); | |
6 | ||
7 | -/* Include configuration, or use the defaults */ | |
8 | -if (file_exists(dirname(__FILE__) . '/config.php')) { | |
9 | - if (!is_readable(dirname(__FILE__) . '/config.php')) { | |
10 | - die('Configuration file include/config.php is present, but unreadable.' . PHP_EOL); | |
11 | - } | |
12 | - include(dirname(__FILE__) . '/config.php'); | |
13 | -} | |
14 | +require '/etc/webapps/cacti/config.php'; | |
15 | ||
16 | if (isset($config['cacti_version'])) { | |
17 | die('Invalid include/config.php file detected.' . PHP_EOL); | |
18 | @@ -238,7 +232,7 @@ if ($config['cacti_server_os'] == 'win32 | |
19 | } | |
20 | ||
21 | $config['include_path'] = dirname(__FILE__); | |
22 | -$config['rra_path'] = $config['base_path'] . '/rra'; | |
23 | +$config["rra_path"] = '/var/lib/cacti/rra'; | |
24 | ||
25 | /* for multiple pollers, we need to know this location */ | |
26 | if (!isset($scripts_path)) { | |
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 @@ | |
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'; | |
38 | $database_retries = 5; | |
39 | $database_ssl = false; | |
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 | |
43 | ||
44 | ini_set('output_buffering', 'Off'); | |
45 | ||
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'); | |
51 | diff -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 | ||
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 | |
68 | ||
69 | $always_paths = array( | |
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 | |
76 | ||
77 | $page_nr = 1; | |
78 | $total_rows = 500; | |
79 | - $logcontents = tail_file($config['base_path'] . '/log/cacti.log', 100, -1, ' INSTALL:' , $page_nr, $total_rows); | |
80 | + $logcontents = tail_file('/var/log/cacti/cacti.log', 100, -1, ' INSTALL:' , $page_nr, $total_rows); | |
81 | ||
82 | $output_log = ''; | |
83 | foreach ($logcontents as $logline) { | |
84 |