summaryrefslogtreecommitdiff
path: root/debian/patches/001_default-rrd-location.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/001_default-rrd-location.diff')
-rw-r--r--debian/patches/001_default-rrd-location.diff38
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/001_default-rrd-location.diff b/debian/patches/001_default-rrd-location.diff
new file mode 100644
index 0000000..54be53f
--- /dev/null
+++ b/debian/patches/001_default-rrd-location.diff
@@ -0,0 +1,38 @@
+Description: Set path to rrd files to /var/lib/mailgraph/
+Forwarded: not-needed
+
+--- a/mailgraph.cgi
++++ b/mailgraph.cgi
+@@ -16,9 +16,9 @@
+ my $points_per_sample = 3;
+ my $ypoints = 160;
+ my $ypoints_err = 96;
+-my $rrd = 'mailgraph.rrd'; # path to where the RRD database is
+-my $rrd_virus = 'mailgraph_virus.rrd'; # path to where the Virus RRD database is
+-my $tmp_dir = '/tmp/mailgraph'; # temporary directory where to store the images
++my $rrd = '/var/lib/mailgraph/mailgraph.rrd'; # path to where the RRD database is
++my $rrd_virus = '/var/lib/mailgraph/mailgraph_virus.rrd'; # path to where the Virus RRD database is
++my $tmp_dir = '/var/lib/mailgraph'; # temporary directory where to store the images
+
+ my @graphs = (
+ { title => 'Last Day', seconds => 3600*24, },
+--- a/mailgraph.pl
++++ b/mailgraph.pl
+@@ -373,7 +373,7 @@
+
+ my $daemon_logfile = '/var/log/mailgraph.log';
+ my $daemon_pidfile = '/var/run/mailgraph.pid';
+-my $daemon_rrd_dir = '/var/log';
++my $daemon_rrd_dir = '/var/lib/mailgraph';
+
+ # global variables
+ my $logfile;
+@@ -411,7 +411,7 @@
+ print " --host=HOST use only entries for HOST (regexp) in syslog\n";
+ print " -d, --daemon start in the background\n";
+ print " --daemon-pid=FILE write PID to FILE instead of /var/run/mailgraph.pid\n";
+- print " --daemon-rrd=DIR write RRDs to DIR instead of /var/log\n";
++ print " --daemon-rrd=DIR write RRDs to DIR instead of /var/lib/mailgraph\n";
+ print " --daemon-log=FILE write verbose-log to FILE instead of /var/log/mailgraph.log\n";
+ print " --ignore-localhost ignore mail to/from localhost (used for virus scanner)\n";
+ print " --ignore-host=HOST ignore mail to/from HOST regexp (used for virus scanner)\n";