]> git.pld-linux.org Git - packages/cacti.git/blame - cacti-config.patch
poller_graphs_reapply_names.php uses -id instead of --id
[packages/cacti.git] / cacti-config.patch
CommitLineData
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
3@@ -42,7 +42,7 @@
4 $cacti_session_name = "Cacti";
5
6 /* Include configuration */
7-include(dirname(__FILE__) . "/config.php");
8+require '/etc/webapps/cacti/config.php';
9
10 if (isset($config["cacti_version"])) {
11 die("Invalid include/config.php file detected.");
6d075ceb
ER
12@@ -101,7 +101,8 @@
13 $config["base_path"] = strtr(ereg_replace("(.*)[\/\\]include", "\\1", dirname(__FILE__)), "\\", "/");
14 $config["library_path"] = ereg_replace("(.*[\/\\])include", "\\1lib", dirname(__FILE__));
15 $config["include_path"] = dirname(__FILE__);
16-$config["rra_path"] = $config["base_path"] . '/rra';
219fa6fd 17+$config["rra_path"] = '/var/lib/cacti/rra';
6d075ceb
ER
18+$config["log_path"] = '/var/log/cacti';
19
20 /* colors */
21 $colors["dark_outline"] = "454E53";
caa81993
ER
22--- cacti-0.8.7g/include/config.php~ 2010-12-13 12:15:08.000000000 +0200
23+++ cacti-0.8.7g/include/config.php 2010-12-13 12:16:09.275611204 +0200
24@@ -26,8 +26,8 @@
4a8ad59c
SP
25 $database_type = "mysql";
26 $database_default = "cacti";
27 $database_hostname = "localhost";
caa81993
ER
28-$database_username = "cactiuser";
29-$database_password = "cactiuser";
30+$database_username = "mysql";
31+$database_password = "";
27f26353 32 $database_port = "3306";
caa81993
ER
33
34 /* load up old style plugins here */
371dd804 35@@ -34,4 +34,6 @@
27f26353
GS
36 /* Default session name - Session name must contain alpha characters */
37 #$cacti_session_name = "Cacti";
371dd804
AM
38
39+$url_path = '/cacti/';
40+
41 ?>
6d075ceb
ER
42--- cacti-0.8.7b/include/global_settings.php~ 2008-10-05 04:29:33.121404239 +0300
43+++ cacti-0.8.7b/include/global_settings.php 2008-10-05 04:41:11.807395633 +0300
44@@ -96,7 +96,7 @@
45 "friendly_name" => "Cacti Log File Path",
46 "description" => "The path to your Cacti log file (if blank, defaults to <path_cacti>/log/cacti.log)",
47 "method" => "filepath",
48- "default" => $config["base_path"] . "/log/cacti.log",
49+ "default" => $config["log_path"] . "/cacti.log",
50 "max_length" => "255"
51 ),
52 "pollerpaths_header" => array(
53--- cacti-0.8.7b/install/index.php~ 2008-10-05 04:29:33.113733438 +0300
54+++ cacti-0.8.7b/install/index.php 2008-10-05 04:41:37.276839747 +0300
55@@ -244,7 +244,7 @@
56 if (config_value_exists("path_cactilog")) {
57 $input["path_cactilog"]["default"] = read_config_option("path_cactilog");
58 } else {
59- $input["path_cactilog"]["default"] = $config["base_path"] . "/log/cacti.log";
60+ $input["path_cactilog"]["default"] = $config["log_path"] . "/cacti.log";
61 }
62
63 /* SNMP Version */
64--- cacti-0.8.7b/lib/functions.php~ 2008-10-05 04:29:33.124737562 +0300
65+++ cacti-0.8.7b/lib/functions.php 2008-10-05 04:42:05.046758504 +0300
66@@ -367,7 +367,7 @@
67 /* Log to Logfile */
68 if ((($logdestination == 1) || ($logdestination == 2)) && (read_config_option("log_verbosity") != POLLER_VERBOSITY_NONE)) {
69 if ($logfile == "") {
70- $logfile = $config["base_path"] . "/log/cacti.log";
71+ $logfile = $config["log_path"] . "/cacti.log";
72 }
73
74 /* echo the data to the log (append) */
ffbcce38
ER
75--- cacti-0.8.8/utilities.php~ 2012-10-29 22:14:05.000000000 +0200
76+++ cacti-0.8.8/utilities.php 2012-10-29 22:15:05.781005237 +0200
77@@ -798,12 +798,12 @@
6d075ceb
ER
78 }
79
80 function utilities_view_logfile() {
ffbcce38
ER
81- global $colors, $log_tail_lines, $page_refresh_interval, $refresh;
82+ global $colors, $log_tail_lines, $page_refresh_interval, $config;
6d075ceb
ER
83
84 $logfile = read_config_option("path_cactilog");
85
86 if ($logfile == "") {
87- $logfile = "./log/rrd.log";
88+ $logfile = $config['log_path']. "/rrd.log";
89 }
90
91 /* helps determine output color */
92@@ -858,7 +858,7 @@
93 }
94
95 function utilities_clear_logfile() {
96- global $colors;
97+ global $config, $colors;
98
99 load_current_session_value("refresh", "sess_logfile_refresh", read_config_option("log_refresh_interval"));
100
101@@ -870,7 +870,7 @@
102 $logfile = read_config_option("path_cactilog");
103
104 if ($logfile == "") {
105- $logfile = "./log/cacti.log";
106+ $logfile = $config['log_path']."/cacti.log";
107 }
108
109 html_start_box("<strong>Clear Cacti Log File</strong>", "100%", $colors["header"], "1", "center", "");
156a14ed
ER
110--- cacti/poller.php~ 2008-10-05 05:08:10.000000000 +0300
111+++ cacti/poller.php 2008-10-05 05:11:11.327705168 +0300
112@@ -1,3 +1,4 @@
113+#!/usr/bin/php
114 <?php
115 /*
116 +-------------------------------------------------------------------------+
117@@ -32,7 +32,7 @@
118 $no_http_headers = true;
119
120 /* start initialization section */
121-include(dirname(__FILE__) . "/include/global.php");
122+require "/usr/share/cacti/include/global.php";
123 include_once($config["base_path"] . "/lib/poller.php");
124 include_once($config["base_path"] . "/lib/data_query.php");
125 include_once($config["base_path"] . "/lib/graph_export.php");
This page took 0.064562 seconds and 4 git commands to generate.