tbrehm
2008-08-31 8aeb9f4169c43eb4d8c2c8bb2f89e866ef25bc27
install/update.php
@@ -69,13 +69,23 @@
include_once('dist/lib/'.$distname.'.lib.php');
include_once('dist/conf/'.$distname.'.conf.php');
//** Get hostname
exec('hostname -f', $tmp_out);
$conf['hostname'] = $tmp_out[0];
unset($tmp_out);
//** Set the mysql login information
$conf["mysql"]["host"] = $conf_old["db_host"];
$conf["mysql"]["database"] = $conf_old["db_database"];
$conf["mysql"]["ispconfig_user"] = $conf_old["db_user"];
$conf["mysql"]["ispconfig_password"] = $conf_old["db_password"];
// 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'] = $conf_old["server_id"];
$conf['ispconfig_log_priority'] = $conf_old["log_priority"];
$inst = new installer();
@@ -196,6 +206,16 @@
   //** Configure Apache
   swriteln('Configuring Apache');
   $inst->configure_apache();
   //* Configure DBServer
   swriteln('Configuring DBServer');
   $inst->configure_dbserver();
   //if(@is_dir('/etc/Bastille')) {
      //* Configure Firewall
      swriteln('Configuring Firewall');
      $inst->configure_firewall();
   //}
}
//** Configure ISPConfig
@@ -203,7 +223,7 @@
//** Customise the port ISPConfig runs on
$inst->conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
$conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', '8080');
$inst->install_ispconfig();