From 0ad6ee4be56a20be5a376beb98733056a541d5fa Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 17 Jul 2013 13:24:22 -0400
Subject: [PATCH] Fix: remove bind mounts from df output in monitor

---
 server/lib/classes/monitor_tools.inc.php |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index c84311c..74d00ba 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -473,7 +473,7 @@
 	}
 
 	public function monitorDiskUsage() {
-		global $conf;
+		global $app,$conf;
 
 		/* the id of the server as int */
 		$server_id = intval($conf['server_id']);
@@ -485,7 +485,10 @@
 		$state = 'ok';
 
 		/** Fetch the data of ALL devices into a array (needed for monitoring!) */
-		$dfData = shell_exec('df -hT 2>/dev/null');
+		//$dfData = shell_exec('df -hT 2>/dev/null');
+		$app->uses('getconf');
+        $web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
+        $dfData = shell_exec('df -hT|grep -v "'.$web_config['website_basedir'].'/" 2>/dev/null');
 
 		// split into array
 		$df = explode("\n", $dfData);

--
Gitblit v1.9.1