Example #1
0
$inst->db = new db();
//** Begin with standard or expert installation
if ($install_mode == 'standard') {
    //* Create the MySQL database
    $inst->configure_database();
    //* Configure Webserver - Apache or nginx
    if ($conf['apache']['installed'] == true && $conf['nginx']['installed'] == true) {
        $http_server_to_use = $inst->simple_query('Apache and nginx detected. Select server to use for ISPConfig:', array('apache', 'nginx'), 'apache');
        if ($http_server_to_use == 'apache') {
            $conf['nginx']['installed'] = false;
        } else {
            $conf['apache']['installed'] = false;
        }
    }
    //* Insert the Server record into the database
    $inst->add_database_server_record();
    //* Configure Postfix
    $inst->configure_postfix();
    //* Configure Mailman
    $inst->configure_mailman('install');
    //* Configure jailkit
    swriteln('Configuring Jailkit');
    $inst->configure_jailkit();
    if ($conf['dovecot']['installed'] == true) {
        //* Configure Dovecot
        swriteln('Configuring Dovecot');
        $inst->configure_dovecot();
    } else {
        //* Configure saslauthd
        swriteln('Configuring SASL');
        $inst->configure_saslauthd();