fix: Updated sed commands to allow rrdstep.php to be used to increase and decrease values (#6941)

This commit is contained in:
Neil Lathwood
2017-07-03 22:02:30 +01:00
committed by Tony Murray
parent f810265cc0
commit a58a2d8677

View File

@@ -72,8 +72,8 @@ foreach ($files as $file) {
$rrd_file = array_pop($tmp);
echo "Converting $file: ";
$command = "$rrdtool dump $file > $random &&
sed -i 's/<step>300/<step>$step/' $random &&
sed -i 's/<minimal_heartbeat>600/<minimal_heartbeat>$heartbeat/' $random &&
sed -i 's/<step>\([0-9]*\)/<step>$step/' $random &&
sed -i 's/<minimal_heartbeat>\([0-9]*\)/<minimal_heartbeat>$heartbeat/' $random &&
$rrdtool restore -f $random $file &&
rm -f $random";
exec($command, $output, $code);