From 39a2d33c4680fe0a0fcd10e864d075f520d9905e Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Fri, 06 Mar 2015 07:22:45 -0500
Subject: [PATCH] Merge branch 'master' into 'master'

---
 server/lib/classes/system.inc.php |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 75dc73d..98fc51f 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -1808,7 +1808,7 @@
 				fileowner($mount_cmd) === 0
 		) {
 			if (!$this->is_mounted($backup_dir)){
-				exec($backup_dir_mount_cmd);
+				exec($mount_cmd);
 				sleep(1);
 				if (!$this->is_mounted($backup_dir)) $mounted = false;
 			}
@@ -1816,7 +1816,21 @@
 
 		return $mounted;
 	}
-				
+
+	function umount_backup_dir($backup_dir, $mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_umount.sh'){
+		if ( 	is_file($mount_cmd) &&
+				is_executable($mount_cmd) &&
+				fileowner($mount_cmd) === 0
+		) {
+			if ($this->is_mounted($backup_dir)){
+				exec($mount_cmd);
+				sleep(1);
+			}
+		}
+
+        return $this->is_mounted($backup_dir) == 0 ? true : false;
+	}
+
 	function getinitcommand($servicename, $action, $init_script_directory = ''){
 		global $conf;
 		// upstart

--
Gitblit v1.9.1