]> git.pld-linux.org Git - packages/cacti.git/blob - cacti-config.patch
- rel 2; few logs locations fixed
[packages/cacti.git] / cacti-config.patch
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
3 @@ -64,10 +64,7 @@ $url_path = '/cacti/';
4  /* allow upto 5000 items to be selected */
5  ini_set('max_input_vars', '5000');
6  
7 -/* Include configuration, or use the defaults */
8 -if (file_exists(dirname(__FILE__) . '/config.php')) {
9 -       include(dirname(__FILE__) . '/config.php');
10 -}
11 +require '/etc/webapps/cacti/config.php';
12  
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';
20 +$config["rra_path"] = '/var/lib/cacti/rra';
21 +$config["path_cactilog"] = '/var/log/cacti/cacti.log';
22  
23  /* for multiple pollers, we need to know this location */
24  if (!isset($scripts_path)) {
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
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
40 @@ -26,7 +26,7 @@
41  /* tick use required as of PHP 4.3.0 to accomodate signal handling */
42  declare(ticks = 1);
43  
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');
49
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) {
This page took 0.141687 seconds and 4 git commands to generate.