import base struct

This commit is contained in:
2015-10-05 11:28:14 +02:00
commit ed39ebe568
11 changed files with 316 additions and 0 deletions

24
cgi-bin/graph.pl Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/perl
use strict;
use warnings;
use RRDs;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
my $TMPLpath = "/var/www/mrtg/tmpl";
my $cgi = new CGI;
my $graph = $cgi->param('graph');
$|++;
print $cgi->header(-type => "image/png");# unless($ARGV[0]);
if($graph) {
if(open(RRD,"<$TMPLpath/$graph.tmpl")) {
my @opts = <RRD>;
close(RRD);
chomp(@opts);
RRDs::graph("-",@opts) or die(RRDs::error);
}
}