Skip to content

Commit 724c363

Browse files
committed
1 parent b8d8d3d commit 724c363

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

install/update.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,14 @@
7171
// Database update is a bit brute force and should be rebuild later ;)
7272

7373
// export the current database data
74-
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");
74+
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");
7575

7676
// Delete the old database
7777
exec("/etc/init.d/mysql stop");
78+
sleep(3);
7879
if($conf["mysql_server_database"] != '') exec("rm -rf /var/lib/mysql/".$conf["mysql_server_database"]);
7980
exec("/etc/init.d/mysql start");
81+
sleep(5);
8082

8183
// Create the mysql database
8284
$inst->configure_database();
@@ -88,7 +90,7 @@
8890
}
8991

9092
// load old data back into database
91-
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");
93+
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");
9294

9395
// Configure postfix
9496
$inst->configure_postfix('dont-create-certs');

0 commit comments

Comments
 (0)