summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--lib/Smokeping.pm2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index cf9ca75..4d2d4f9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+* don't create directories in "datadir" when running as a CGI
+ -- niko
* the DYNAMIC-related files (.adr and .snmp) can now be located outside "datadir"
by specifying the new configuration variable "dyndir"
-- niko, suggested by Marc Haber <mh+smokeping-users *zugschlus.de>
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index a14699f..28923e7 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -363,7 +363,7 @@ sub init_target_tree ($$$$) {
foreach my $prop (keys %{$tree}) {
if (ref $tree->{$prop} eq 'HASH'){
- if (not -d $name) {
+ if (not -d $name and not $cgimode) {
mkdir $name, 0755 or die "ERROR: mkdir $name: $!\n";
};
init_target_tree $cfg, $probes, $tree->{$prop}, "$name/$prop";