Logoj0ke.net Open Build Service > Projects > server:monitoring > cacti > cacti-0.8.7a-cacti-log-path.patch
Sign Up | Log In

File cacti-0.8.7a-cacti-log-path.patch of Package cacti (Revision 3d8e96d6821c19f501b5ec5349810324)

Currently displaying revision 3d8e96d6821c19f501b5ec5349810324, show latest

x
 
1
--- include/global_settings.php
2
+++ include/global_settings.php
3
@@ -94,9 +94,9 @@
4
            ),
5
        "path_cactilog" => array(
6
            "friendly_name" => "Cacti Log File Path",
7
-           "description" => "The path to your Cacti log file (if blank, defaults to <path_cacti>/log/cacti.log)",
8
+           "description" => "The path to your Cacti log file (if blank, defaults to /var/log/cacti.log)",
9
            "method" => "filepath",
10
-           "default" => $config["base_path"] . "/log/cacti.log",
11
+           "default" => "/var/log/cacti.log",
12
            "max_length" => "255"
13
            ),
14
        "pollerpaths_header" => array(
15
--- install/index.php
16
+++ install/index.php
17
@@ -244,7 +244,7 @@
18
 if (config_value_exists("path_cactilog")) {
19
    $input["path_cactilog"]["default"] = read_config_option("path_cactilog");
20
 } else {
21
-   $input["path_cactilog"]["default"] = $config["base_path"] . "/log/cacti.log";
22
+   $input["path_cactilog"]["default"] = "/var/log/cacti.log";
23
 }
24
 
25
 /* SNMP Version */
26
--- lib/functions.php
27
+++ lib/functions.php
28
@@ -365,7 +365,7 @@
29
    /* Log to Logfile */
30
    if ((($logdestination == 1) || ($logdestination == 2)) && (read_config_option("log_verbosity") != POLLER_VERBOSITY_NONE)) {
31
        if ($logfile == "") {
32
-           $logfile = $config["base_path"] . "/log/cacti.log";
33
+           $logfile = "/var/log/cacti.log";
34
        }
35
 
36
        /* echo the data to the log (append) */
37
--- script_server.pl
38
+++ script_server.pl
39
@@ -1,4 +1,4 @@
40
-chdir("./scripts");
41
+chdir("/usr/share/cacti/scripts");
42
 $loaded = 0;
43
 while ($file = <*.pl>) {
44
    next if $file eq $0;
45
--- utilities.php
46
+++ utilities.php
47
@@ -681,7 +681,7 @@
48
    $logfile = read_config_option("path_cactilog");
49
 
50
    if ($logfile == "") {
51
-       $logfile = "./log/rrd.log";
52
+       $logfile = "/var/log/rrd.log";
53
    }
54
 
55
    /* helps determine output color */
56
@@ -919,7 +919,7 @@
57
    $logfile = read_config_option("path_cactilog");
58
 
59
    if ($logfile == "") {
60
-       $logfile = "./log/cacti.log";
61
+       $logfile = "/var/log/cacti.log";
62
    }
63
 
64
    html_start_box("<strong>Clear Cacti Log File</strong>", "100%", $colors["header"], "1", "center", "");
65