diff options
Diffstat (limited to 'etc/inc/rrd.inc')
-rw-r--r-- | etc/inc/rrd.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index 5294075..ef79a37 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -66,6 +66,9 @@ function restore_rrd() { } foreach (glob("{$rrddbpath}/*.xml") as $xml_file) { $rrd_file = preg_replace('/\.xml$/', ".rrd", $xml_file); + if (file_exists("{$rrd_file}")) { + unlink($rrd_file); + } exec("$rrdtool restore '{$xml_file}' '{$rrd_file}'"); unlink($xml_file); } |