示例#1
0
}
//* Check if this is a master / slave setup
$conf['mysql']['master_slave_setup'] = 'n';
if ($conf["mysql"]["master_host"] != '' && $conf["mysql"]["host"] != $conf["mysql"]["master_host"]) {
    $conf['mysql']['master_slave_setup'] = 'y';
}
// Resolve the IP address of the mysql hostname.
if (!($conf['mysql']['ip'] = gethostbyname($conf['mysql']['host']))) {
    die('Unable to resolve hostname' . $conf['mysql']['host']);
}
$conf['server_id'] = intval($conf_old["server_id"]);
$conf['ispconfig_log_priority'] = $conf_old["log_priority"];
$inst = new installer();
$inst->is_update = true;
//** Detect the installed applications
$inst->find_installed_apps();
//** Initialize the MySQL server connection
include_once 'lib/mysql.lib.php';
//** Database update is a bit brute force and should be rebuild later ;)
/*
 * Try to read the DB-admin settings
 */
$clientdb_host = '';
$clientdb_user = '';
$clientdb_password = '';
include_once "/usr/local/ispconfig/server/lib/mysql_clientdb.conf";
$conf["mysql"]["admin_user"] = $clientdb_user;
$conf["mysql"]["admin_password"] = $clientdb_password;
$clientdb_host = '';
$clientdb_user = '';
$clientdb_password = '';