From 09504475c41653b151b02605ea1ea7b53f86e222 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Tue, 22 Feb 2005 20:18:14 +0000 Subject: * don't create any RRD files if running as a CGI -- niko --- CHANGES | 1 + lib/Smokeping.pm | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index e1a3e7f..0383933 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,4 @@ +* don't create any RRD files if running as a CGI -- niko * Curl timeouts work better now -- niko, reported by Chris Wilson * Curl User-Agent string doesn't need quotes anymore -- niko * check at startup that existing RRD files conform to the config specifications -- niko diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index 82113a3..8cd5897 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -370,10 +370,12 @@ sub init_target_tree ($$$$) { 1..$pings), (map { "RRA:".(join ":", @{$_}) } @{$cfg->{Database}{_table}} )); if (not -f $name.".rrd"){ - do_debuglog("Calling RRDs::create(@create)"); - RRDs::create(@create); - my $ERROR = RRDs::error(); - do_log "RRDs::create ERROR: $ERROR\n" if $ERROR; + unless ($cgimode) { + do_debuglog("Calling RRDs::create(@create)"); + RRDs::create(@create); + my $ERROR = RRDs::error(); + do_log "RRDs::create ERROR: $ERROR\n" if $ERROR; + } } else { shift @create; # remove the filename my $comparison = Smokeping::RRDtools::compare($name.".rrd", \@create); -- cgit v1.2.3-24-g4f1b