From 924495bb2d732548083de9e54bf93eebe7f0d910 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Tue, 12 Jan 2010 19:58:47 +0100 Subject: make rrdtool executable configurable --- inc/rrdtool.class.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'inc/rrdtool.class.php') diff --git a/inc/rrdtool.class.php b/inc/rrdtool.class.php index 7dcbc2a..f7907ec 100644 --- a/inc/rrdtool.class.php +++ b/inc/rrdtool.class.php @@ -1,9 +1,20 @@ rrdtool = $rrdtool; + } else { + printf('

Error: RRDTool (%s) is not executable. Please install RRDTool it and configure $CONFIG[\'rrdtool\'].

', $rrdtool); + die(); + } + } + function rrd_info($rrdfile) { if (file_exists($rrdfile)) { - $raw_info = shell_exec('/usr/bin/rrdtool info '.$rrdfile); + $raw_info = shell_exec($this->rrdtool.' info '.$rrdfile); $raw_array = explode("\n", $raw_info); foreach ($raw_array as $key => $info) { if ($info != "") { -- cgit v1.1