Fixed issue with using dir

This commit is contained in:
laf
2015-07-10 16:28:47 +01:00
parent 2d78c7d3e0
commit 0e45bad173
2 changed files with 3 additions and 2 deletions

View File

@@ -31,9 +31,10 @@ if($width > "500")
$rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." RTT Loss SDev RTT\:SDev \l'";
}
$filename_dir = generate_smokeping_dir($device);
if($src['hostname'] == $config['own_hostname'])
{
$filename_dir = generate_smokeping_dir($device);
$filename = $filename_dir . $device['hostname'].'.rrd';
if (!file_exists($filename_dir.$device['hostname'].'.rrd'))
{
// Try with dots in hostname replaced by underscores