]>
Commit | Line | Data |
---|---|---|
caa81993 ER |
1 | --- cacti-0.8.7b/include/global.php 2008-10-05 04:38:29.740276226 +0300 |
2 | +++ cacti-0.8.7g/include/global.php 2010-12-13 12:10:44.312310245 +0200 | |
d848f153 AM |
3 | @@ -64,10 +64,7 @@ $url_path = '/cacti/'; |
4 | /* allow upto 5000 items to be selected */ | |
81fd7803 | 5 | ini_set('max_input_vars', '5000'); |
caa81993 | 6 | |
d848f153 AM |
7 | -/* Include configuration, or use the defaults */ |
8 | -if (file_exists(dirname(__FILE__) . '/config.php')) { | |
9 | - include(dirname(__FILE__) . '/config.php'); | |
10 | -} | |
caa81993 ER |
11 | +require '/etc/webapps/cacti/config.php'; |
12 | ||
81fd7803 AM |
13 | if (isset($config['cacti_version'])) { |
14 | die('Invalid include/config.php file detected.'); | |
15 | @@ -139,7 +139,8 @@ if ($config['cacti_server_os'] == 'win32 | |
16 | $config['library_path'] = preg_replace("/(.*[\/])include/", "\\1lib", dirname(__FILE__)); | |
17 | } | |
18 | $config['include_path'] = dirname(__FILE__); | |
19 | -$config['rra_path'] = $config['base_path'] . '/rra'; | |
219fa6fd | 20 | +$config["rra_path"] = '/var/lib/cacti/rra'; |
81fd7803 | 21 | +$config["path_cactilog"] = '/var/log/cacti/cacti.log'; |
6d075ceb | 22 | |
81fd7803 AM |
23 | /* for multiple pollers, we need to know this location */ |
24 | if (!isset($scripts_path)) { | |
caa81993 ER |
25 | --- cacti-0.8.7g/include/config.php~ 2010-12-13 12:15:08.000000000 +0200 |
26 | +++ cacti-0.8.7g/include/config.php 2010-12-13 12:16:09.275611204 +0200 | |
81fd7803 AM |
27 | @@ -27,8 +27,8 @@ |
28 | $database_type = 'mysql'; | |
29 | $database_default = 'cacti'; | |
30 | $database_hostname = 'localhost'; | |
31 | -$database_username = 'cactiuser'; | |
32 | -$database_password = 'cactiuser'; | |
33 | +$database_username = 'mysql'; | |
34 | +$database_password = ''; | |
35 | $database_port = '3306'; | |
36 | $database_ssl = false; | |
37 | ||
38 | --- cacti/poller.php~ 2017-08-28 05:48:36.000000000 +0200 | |
39 | +++ cacti/poller.php 2017-08-31 08:39:19.780902180 +0200 | |
e90920b5 AM |
40 | @@ -26,7 +26,7 @@ |
41 | /* tick use required as of PHP 4.3.0 to accomodate signal handling */ | |
42 | declare(ticks = 1); | |
6d075ceb | 43 | |
e90920b5 AM |
44 | -require(__DIR__ . '/include/cli_check.php'); |
45 | +require('/usr/share/cacti/include/cli_check.php'); | |
46 | require_once($config['base_path'] . '/lib/poller.php'); | |
47 | require_once($config['base_path'] . '/lib/data_query.php'); | |
48 | require_once($config['base_path'] . '/lib/rrd.php'); | |
81fd7803 | 49 | |
3d449d4f AM |
50 | diff -ur cacti-1.2.6.org/install/functions.php cacti-1.2.6/install/functions.php |
51 | --- cacti-1.2.6.org/install/functions.php 2019-09-02 10:23:43.000000000 +0200 | |
52 | +++ cacti-1.2.6/install/functions.php 2019-09-26 11:19:59.780907049 +0200 | |
53 | @@ -794,8 +794,8 @@ | |
54 | $section = 'general'; | |
55 | } | |
56 | $logfile = 'install' . '-' . $section; | |
57 | - file_put_contents($config['base_path'] . '/log/' . $logfile . '.log', sprintf($format_log1, $day, $time, $levelname, $data, PHP_EOL), $flags); | |
58 | - file_put_contents($config['base_path'] . '/log/install-complete.log', sprintf($format_log2, $day, $time, $sectionname, $levelname, $data, PHP_EOL), $flags); | |
59 | + file_put_contents('/var/log/cacti/' . $logfile . '.log', sprintf($format_log1, $day, $time, $levelname, $data, PHP_EOL), $flags); | |
60 | + file_put_contents('/var/log/cacti/install-complete.log', sprintf($format_log2, $day, $time, $sectionname, $levelname, $data, PHP_EOL), $flags); | |
61 | } | |
62 | } | |
63 | ||
64 | diff -ur cacti-1.2.6.org/lib/installer.php cacti-1.2.6/lib/installer.php | |
65 | --- cacti-1.2.6.org/lib/installer.php 2019-09-02 10:23:43.000000000 +0200 | |
66 | +++ cacti-1.2.6/lib/installer.php 2019-09-26 11:20:54.749208954 +0200 | |
67 | @@ -465,7 +465,6 @@ | |
68 | ||
69 | $always_paths = array( | |
70 | sys_get_temp_dir(), | |
71 | - $config['base_path'] . '/log', | |
72 | $config['base_path'] . '/cache/boost', | |
73 | $config['base_path'] . '/cache/mibcache', | |
74 | $config['base_path'] . '/cache/realtime', | |
75 | @@ -3216,7 +3215,7 @@ | |
76 | global $config; | |
77 | ||
78 | $page_nr = 1; | |
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) { |