From 724c3636394d4406d5418e203bf7cfd0726d36d8 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 02 Jul 2007 16:46:50 -0400
Subject: [PATCH] 

---
 install/update.php |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/install/update.php b/install/update.php
index 8a81e32..283bf0d 100644
--- a/install/update.php
+++ b/install/update.php
@@ -71,12 +71,14 @@
 // Database update is a bit brute force and should be rebuild later ;)
 
 // export the current database data
-exec("mysqldump -h $conf[mysql_server_host] -u $conf[mysql_server_ispconfig_user] -p$conf[mysql_server_ispconfig_password] -c -t --add-drop-table --add-locks --all --quick --lock-tables $conf[mysql_server_database] > existing_db.sql  &> /dev/null");
+system("mysqldump -h $conf[mysql_server_host] -u $conf[mysql_server_ispconfig_user] -p$conf[mysql_server_ispconfig_password] -c -t --add-drop-table --add-locks --all --quick --lock-tables $conf[mysql_server_database] > existing_db.sql");
 
 // Delete the old database
 exec("/etc/init.d/mysql stop");
+sleep(3);
 if($conf["mysql_server_database"] != '') exec("rm -rf /var/lib/mysql/".$conf["mysql_server_database"]);
 exec("/etc/init.d/mysql start");
+sleep(5);
 
 // Create the mysql database
 $inst->configure_database();
@@ -88,7 +90,7 @@
 }
 
 // load old data back into database
-exec("mysql -h $conf[mysql_server_host] -u $conf[mysql_server_ispconfig_user] -p$conf[mysql_server_ispconfig_password] $conf[mysql_server_database] < existing_db.sql  &> /dev/null");
+system("mysql -h $conf[mysql_server_host] -u $conf[mysql_server_ispconfig_user] -p$conf[mysql_server_ispconfig_password] $conf[mysql_server_database] < existing_db.sql");
 
 // Configure postfix
 $inst->configure_postfix('dont-create-certs');

--
Gitblit v1.9.1