mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
log_error if rrdtool restore calls fail
This commit is contained in:
parent
0887774669
commit
5d51f00ec7
@ -69,7 +69,13 @@ function restore_rrd() {
|
||||
if (file_exists("{$rrd_file}")) {
|
||||
unlink($rrd_file);
|
||||
}
|
||||
exec("$rrdtool restore -f '{$xml_file}' '{$rrd_file}'");
|
||||
$output = array();
|
||||
$status = null;
|
||||
exec("$rrdtool restore -f '{$xml_file}' '{$rrd_file}'", $output, $status);
|
||||
if ($status) {
|
||||
log_error("rrdtool restore -f '{$xml_file}' '{$rrd_file}' failed returning {$status}.");
|
||||
continue;
|
||||
}
|
||||
unlink($xml_file);
|
||||
}
|
||||
return true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user