Marius Cramer
2015-08-06 37b29231e47a0c4458dc1c15d98588f16f07e1e2
install/update.php
@@ -247,13 +247,15 @@
   $finished = false;
   do {
      $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname');
      $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port');
      $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user');    
      $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password');
      $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database');
      //* Initialize the MySQL server connection
      if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) {
      if(@mysql_connect($tmp_mysql_server_host . ':' . (int)$tmp_mysql_server_port, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) {
         $conf['mysql']['master_host'] = $tmp_mysql_server_host;
         $conf['mysql']['master_port'] = $tmp_mysql_server_port;
         $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user;
         $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password;
         $conf['mysql']['master_database'] = $tmp_mysql_server_database;
@@ -267,10 +269,8 @@
   // initialize the connection to the master database
   $inst->dbmaster = new db();
   if($inst->dbmaster->linkId) $inst->dbmaster->closeConn();
   $inst->dbmaster->dbHost = $conf['mysql']["master_host"];
   $inst->dbmaster->dbName = $conf['mysql']["master_database"];
   $inst->dbmaster->dbUser = $conf['mysql']["master_admin_user"];
   $inst->dbmaster->dbPass = $conf['mysql']["master_admin_password"];
   $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]);
   $inst->dbmaster->setDBName($conf['mysql']["master_database"]);
} else {
   $inst->dbmaster = $inst->db;
}
@@ -516,6 +516,8 @@
//* Set default servers
setDefaultServers();
$inst->create_mount_script();
//* Create md5 filelist
$md5_filename = '/usr/local/ispconfig/security/data/file_checksums_'.date('Y-m-d_h-i').'.md5';
exec('find /usr/local/ispconfig -type f -print0 | xargs -0 md5sum > '.$md5_filename);