X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=examples%2F4charts.pl.in;h=a11b944185db50684b70ed918863d793f0346072;hp=beeb6f4a2e6f218e10c24395aeb603269ff73a33;hb=ca8d9c109d76e8c024f21edd10474e0e5d29b892;hpb=c2588300e3b61df51b846dd79d90b3da9628d0cb diff --git a/examples/4charts.pl.in b/examples/4charts.pl.in index beeb6f4..a11b944 100755 --- a/examples/4charts.pl.in +++ b/examples/4charts.pl.in @@ -8,6 +8,7 @@ use RRDs; my $start=time; my $rrd="randome.rrd"; my $name = $0; +$name =~ s/.*\///g; $name =~ s/\.pl.*//g; RRDs::create ($rrd, "--start",$start-1, "--step",300, @@ -116,7 +117,7 @@ RRDs::graph "$name-sample.png", ; if ($ERROR = RRDs::error) { - print "ERROR: $ERROR\n"; + die "ERROR: $ERROR\n"; }; print "This script has created $name.png in the current directory\n";