tbrehm
2008-08-18 748bd4efbb65ba96015b2bc23bfcf8e915f17f67
install/install.php
@@ -95,7 +95,7 @@
//** Get the hostname
$tmp_out = array();
exec('hostname -f', $tmp_out);
$inst->conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg foo.example.com ', $tmp_out[0]);
$conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg foo.example.com ', $tmp_out[0]);
unset($tmp_out);
//** Get MySQL root credentials
@@ -118,6 +118,10 @@
   }
} while ($finished == false);
unset($finished);
// Resolve the IP address of the mysql hostname.
if(!$conf['mysql']['ip'] = gethostbyname($conf['mysql']['host'])) die('Unable to resolve hostname'.$conf['mysql']['host']);
//** initializing database connection
include_once('lib/mysql.lib.php');
@@ -175,12 +179,16 @@
   //* Configure Apache
   swriteln('Configuring Apache');
   $inst->configure_apache();
   //* Configure Firewall
   swriteln('Configuring Firewall');
   $inst->configure_firewall();
   //* Configure ISPConfig
   swriteln('Installing ISPConfig');
   
   //** 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();
   
@@ -282,6 +290,12 @@
      $inst->configure_apache();
   }
   
   //** Configure Firewall
   if(strtolower($inst->simple_query('Configure Firewall Server',array('y','n'),'y')) == 'y') {
      swriteln('Configuring Firewall');
      $inst->configure_firewall();
   }
   //** Configure ISPConfig :-)
   if(strtolower($inst->simple_query('Install ISPConfig Web-Interface',array('y','n'),'y')) == 'y') {
      swriteln('Installing ISPConfig');
@@ -294,14 +308,14 @@
      if($fast_cgi == 'yes') {
          $alias = $inst->free_query('Script Alias', '/php/');
          $path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin');
          $inst->conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path);
          $conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path);
      } else {
          $inst->conf['apache']['vhost_cgi_alias'] = "";
          $conf['apache']['vhost_cgi_alias'] = "";
      }
      */
      //** 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_interface = true;