Skip to content
......@@ -99,13 +99,14 @@ require_once 'lib/classes/tpl.inc.php';
die('We will stop here. There is already a ISPConfig installation, use the update script to update this installation.');
}*/
// Patch is required to reapir latest amavis versions
// Patch is required to repair latest amavis versions
if(is_installed('amavisd-new') && !is_installed('patch')) die('The patch command is missing. Install patch command and start installation again.');
//** Get distribution identifier
$dist = get_distname();
if($dist['id'] == '') die('Linux distribution or version not recognized.');
if(!$dist['supported']) die('This distribution is not supported.');
//** Include the autoinstaller configuration (for non-interactive setups)
error_reporting(E_ALL ^ E_NOTICE);
......@@ -170,7 +171,9 @@ if(is_dir('/usr/local/ispconfig')) {
}
//** Detect the installed applications
$inst->raiseEvent('find_installed_apps::before');
$inst->find_installed_apps();
$inst->raiseEvent('find_installed_apps::after');
//** Select the language and set default timezone
$conf['language'] = $inst->simple_query('Select language', array('en', 'de'), 'en','language');
......@@ -182,6 +185,7 @@ $conf['language_file_import_enabled'] = true;
//** Select installation mode
$install_mode = $inst->simple_query('Installation mode', array('standard', 'expert'), 'standard','install_mode');
$inst->set_install_mode($install_mode);
//** tRNG dependencies
$conf['tRNG']='';
......@@ -252,10 +256,8 @@ $conf['services']['web'] = false;
$conf['services']['dns'] = false;
$conf['services']['file'] = false;
$conf['services']['db'] = true;
$conf['services']['vserver'] = false;
$conf['services']['firewall'] = false;
$conf['services']['proxy'] = false;
$conf['services']['xmpp'] = false;
//** Get Server ID
// $conf['server_id'] = $inst->free_query('Unique Numeric ID of the server','1');
......@@ -339,48 +341,16 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Mail
}
if($conf['services']['mail']) {
//* Configure Mailman
$force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman', ($install_mode == 'expert'));
if($force) {
swriteln('Configuring Mailman');
$inst->configure_mailman();
}
//* Configure mlmmj
if($conf['mlmmj']['installed'] == true) {
swriteln('Configuring Mlmmj');
$inst->configure_mlmmj(/*install*/);
}
//* Check for Dovecot and Courier
if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) {
//* Check for Dovecot
if(!$conf['dovecot']['installed']) {
$conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot', ($install_mode == 'expert'));
$conf['courier']['installed'] = $inst->force_configure_app('Courier', ($install_mode == 'expert'));
}
//* Configure Mailserver - Dovecot or Courier
if($conf['dovecot']['installed'] && $conf['courier']['installed']) {
$mail_server_to_use = $inst->simple_query('Dovecot and Courier detected. Select server to use with ISPConfig:', array('dovecot', 'courier'), 'dovecot','mail_server');
if($mail_server_to_use == 'dovecot'){
$conf['courier']['installed'] = false;
} else {
$conf['dovecot']['installed'] = false;
}
}
//* Configure Dovecot
if($conf['dovecot']['installed']) {
swriteln('Configuring Dovecot');
$inst->configure_dovecot();
}
//* Configure Courier
if($conf['courier']['installed']) {
swriteln('Configuring Courier');
$inst->configure_courier();
swriteln('Configuring SASL');
$inst->configure_saslauthd();
swriteln('Configuring PAM');
$inst->configure_pam();
}
//* Configure Spamasassin
$force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin', ($install_mode == 'expert'));
if($force) {
......@@ -395,6 +365,12 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Mail
$inst->configure_amavis();
}
//* Configure Rspamd
$force = @($conf['rspamd']['installed']) ? true : $inst->force_configure_app('Rspamd', ($install_mode == 'expert'));
if($force) {
swriteln('Configuring Rspamd');
$inst->configure_rspamd();
}
//* Configure Getmail
$force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail', ($install_mode == 'expert'));
if($force) {
......@@ -483,12 +459,7 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Web
}
}
//* Configure OpenVZ
$force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ', ($install_mode == 'expert'));
if($force) {
$conf['services']['vserver'] = true;
swriteln('Configuring OpenVZ');
}
$inst->raiseEvent('configure_webserver_selection::after');
if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Firewall Server', array('y', 'n'), 'y','configure_firewall')) == 'y') {
//* Check for Firewall
......@@ -520,22 +491,6 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Fire
}
}
if($install_mode == 'standard' || strtolower($inst->simple_query('Configure XMPP Server', array('y', 'n') , 'y','configure_xmpp') ) == 'y') {
//* Configure XMPP Metronome
if ($conf['metronome']['installed']) {
swriteln('Configuring Metronome XMPP Server');
$inst->configure_metronome();
$conf['services']['xmpp'] = true;
}
//* Configure XMPP Prosody
if ($conf['prosody']['installed']) {
swriteln('Configuring Prosody XMPP Server');
$inst->configure_prosody();
$conf['services']['xmpp'] = true;
}
}
//* Configure Fail2ban
$force = @($conf['fail2ban']['installed']) ? true : $inst->force_configure_app('Fail2ban', ($install_mode == 'expert'));
if($force) {
......@@ -554,20 +509,6 @@ $install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] ==
if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPConfig Web Interface', array('y', 'n'), $install_ispconfig_interface_default,'install_ispconfig_web_interface')) == 'y') {
swriteln('Installing ISPConfig');
//** We want to check if the server is a module or cgi based php enabled server
//** TODO: Don't always ask for this somehow ?
/*
$fast_cgi = $inst->simple_query('CGI PHP Enabled Server?', array('yes','no'),'no');
if($fast_cgi == 'yes') {
$alias = $inst->free_query('Script Alias', '/php/');
$path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin');
$conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path);
} else {
$conf['apache']['vhost_cgi_alias'] = "";
}
*/
//** Customise the port ISPConfig runs on
$ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port');
$temp_admin_password = str_shuffle(bin2hex(openssl_random_pseudo_bytes(4)));
......@@ -597,7 +538,16 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPCon
$inst->install_ispconfig_interface = false;
}
// Create SSL certs for non-webserver(s)?
if(!file_exists('/usr/local/ispconfig/interface/ssl/ispserver.crt')) {
if(strtolower($inst->simple_query('Do you want to create SSL certs for your server?', array('y', 'n'), 'y')) == 'y') {
$inst->make_ispconfig_ssl_cert();
}
}
$inst->raiseEvent('install_ispconfig::before');
$inst->install_ispconfig();
$inst->raiseEvent('install_ispconfig::after');
//* Configure DBServer
swriteln('Configuring DBServer');
......@@ -606,7 +556,6 @@ $inst->configure_dbserver();
//* Configure ISPConfig
swriteln('Installing ISPConfig crontab');
if($conf['cron']['installed']) {
swriteln('Installing ISPConfig crontab');
$inst->install_crontab();
} else swriteln('[ERROR] Cron not found');
......@@ -616,18 +565,10 @@ $inst->detect_ips();
swriteln('Restarting services ...');
if($conf['mysql']['installed'] == true && $conf['mysql']['init_script'] != '') system($inst->getinitcommand($conf['mysql']['init_script'], 'restart').' >/dev/null 2>&1');
if($conf['postfix']['installed'] == true && $conf['postfix']['init_script'] != '') system($inst->getinitcommand($conf['postfix']['init_script'], 'restart'));
if($conf['saslauthd']['installed'] == true && $conf['saslauthd']['init_script'] != '') system($inst->getinitcommand($conf['saslauthd']['init_script'], 'restart'));
if($conf['amavis']['installed'] == true && $conf['amavis']['init_script'] != '') system($inst->getinitcommand($conf['amavis']['init_script'], 'restart'));
if($conf['rspamd']['installed'] == true && $conf['rspamd']['init_script'] != '') system($inst->getinitcommand($conf['rspamd']['init_script'], 'restart'));
if($conf['clamav']['installed'] == true && $conf['clamav']['init_script'] != '') system($inst->getinitcommand($conf['clamav']['init_script'], 'restart'));
if($conf['courier']['installed'] == true){
if($conf['courier']['courier-authdaemon'] != '') system($inst->getinitcommand($conf['courier']['courier-authdaemon'], 'restart'));
if($conf['courier']['courier-imap'] != '') system($inst->getinitcommand($conf['courier']['courier-imap'], 'restart'));
if($conf['courier']['courier-imap-ssl'] != '') system($inst->getinitcommand($conf['courier']['courier-imap-ssl'], 'restart'));
if($conf['courier']['courier-pop'] != '') system($inst->getinitcommand($conf['courier']['courier-pop'], 'restart'));
if($conf['courier']['courier-pop-ssl'] != '') system($inst->getinitcommand($conf['courier']['courier-pop-ssl'], 'restart'));
}
if($conf['dovecot']['installed'] == true && $conf['dovecot']['init_script'] != '') system($inst->getinitcommand($conf['dovecot']['init_script'], 'restart'));
if($conf['mailman']['installed'] == true && $conf['mailman']['init_script'] != '') system('nohup '.$inst->getinitcommand($conf['mailman']['init_script'], 'restart').' >/dev/null 2>&1 &');
if($conf['apache']['installed'] == true && $conf['apache']['init_script'] != '') system($inst->getinitcommand($conf['apache']['init_script'], 'restart'));
//* Reload is enough for nginx
if($conf['nginx']['installed'] == true){
......@@ -641,7 +582,6 @@ if($conf['bind']['installed'] == true && $conf['bind']['init_script'] != '') sys
//if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null');
if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'restart').' &> /dev/null');
if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '') system($inst->getinitcommand($conf['ufw']['init_script'], 'restart').' &> /dev/null');
if($conf['metronome']['installed'] == true && $conf['metronome']['init_script'] != '') system($inst->getinitcommand($conf['metronome']['init_script'], 'restart').' &> /dev/null');
//* test tRNG
if($conf['tRNG']) tRNG();
......
<?php
/**
* Base class for app installer
* This is a stripped down class with only the event method. The full class is only used in /server/lib/classes
*
* @author Marius Burkard
*/
class ispconfig_addon_installer_base {
protected $addon_ident;
public function __construct() {
$this->addon_ident = preg_replace('/_addon_installer$/', '', get_called_class());
}
public function onRaisedInstallerEvent($event_name, $data = false) {
}
}
......@@ -357,147 +357,6 @@ if (!defined('vlibTemplateClassLoaded')) {
return true;
}
/**
* [** EXPERIMENTAL **]
* Function to create a loop from a Db result resource link.
* @param string $loopname to commit loop. If not set, will use last loopname set using newLoop()
* @param string $result link to a Db result resource
* @param string $db_type, type of db that the result resource belongs to.
* @return boolean true/false
* @access public
*/
public function setDbLoop($loopname, $result, $db_type = 'MYSQL')
{
/*
$db_type = strtoupper($db_type);
if (!in_array($db_type, $this->allowed_loop_dbs)) {
vlibTemplateError::raiseError('VT_WARNING_INVALID_LOOP_DB', WARNING, $db_type);
return false;
}
$loop_arr = array();
// TODO: Are all these necessary as were onyl using mysql and possible postgres ? - pedro
switch ($db_type) {
case 'MYSQL':
if (get_resource_type($result) != 'mysql result') {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
while($r = mysql_fetch_assoc($result)) {
$loop_arr[] = $r;
}
break;
case 'POSTGRESQL':
if (get_resource_type($result) != 'pgsql result') {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
$nr = (function_exists('pg_num_rows')) ? pg_num_rows($result) : pg_numrows($result);
for ($i=0; $i < $nr; $i++) {
$loop_arr[] = pg_fetch_array($result, $i, PGSQL_ASSOC);
}
break;
case 'INFORMIX':
if (!$result) {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
while($r = ifx_fetch_row($result, 'NEXT')) {
$loop_arr[] = $r;
}
break;
case 'INTERBASE':
if (get_resource_type($result) != 'interbase result') {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
while($r = ibase_fetch_row($result)) {
$loop_arr[] = $r;
}
break;
case 'INGRES':
if (!$result) {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
while($r = ingres_fetch_array(INGRES_ASSOC, $result)) {
$loop_arr[] = $r;
}
break;
case 'MSSQL':
if (get_resource_type($result) != 'mssql result') {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
while($r = mssql_fetch_array($result)) {
$loop_arr[] = $r;
}
break;
case 'MSQL':
if (get_resource_type($result) != 'msql result') {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
while($r = msql_fetch_array($result, MSQL_ASSOC)) {
$loop_arr[] = $r;
}
break;
case 'OCI8':
if (get_resource_type($result) != 'oci8 statement') {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
while(OCIFetchInto($result, &$r, OCI_ASSOC+OCI_RETURN_LOBS)) {
$loop_arr[] = $r;
}
break;
case 'ORACLE':
if (get_resource_type($result) != 'oracle Cursor') {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
while(ora_fetch_into($result, &$r, ORA_FETCHINTO_ASSOC)) {
$loop_arr[] = $r;
}
break;
case 'OVRIMOS':
if (!$result) {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
while(ovrimos_fetch_into($result, &$r, 'NEXT')) {
$loop_arr[] = $r;
}
break;
case 'SYBASE':
if (get_resource_type($result) != 'sybase-db result') {
vlibTemplateError::raiseError('VT_WARNING_INVALID_RESOURCE', WARNING, $db_type);
return false;
}
while($r = sybase_fetch_array($result)) {
$loop_arr[] = $r;
}
break;
}
$this->setLoop($loopname, $loop_arr);
return true;
*/
}
/**
* Sets the name for the curent loop in the 3 step loop process.
* @param string $name string to define loop name
......
......@@ -48,6 +48,7 @@ function get_distname() {
$distver = '';
$distid = '';
$distbaseid = '';
$distsupported = false;
//** Debian or Ubuntu
if(file_exists('/etc/debian_version')) {
......@@ -100,22 +101,27 @@ function get_distname() {
case "18.04":
$relname = "(Bionic Beaver)";
$distconfid = 'ubuntu1804';
$distsupported = true;
break;
case "17.10":
$relname = "(Artful Aardvark)";
$distconfid = 'ubuntu1710';
$distsupported = true;
break;
case "17.04":
$relname = "(Zesty Zapus)";
$distconfid = 'ubuntu1604';
$distsupported = true;
break;
case "16.10":
$relname = "(Yakkety Yak)";
$distconfid = 'ubuntu1604';
$distsupported = true;
break;
case "16.04":
$relname = "(Xenial Xerus)";
$distconfid = 'ubuntu1604';
$distsupported = true;
break;
case "15.10":
$relname = "(Wily Werewolf)";
......@@ -221,6 +227,7 @@ function get_distname() {
$distver = 'Jessie';
$distid = 'debian60';
$distbaseid = 'debian';
$distsupported = true;
swriteln("Operating System: Debian 8.0 (Jessie) or compatible\n");
} elseif(strstr(trim(file_get_contents('/etc/debian_version')), '9') || substr(trim(file_get_contents('/etc/debian_version')),0,1) == '9') {
$distname = 'Debian';
......@@ -228,6 +235,7 @@ function get_distname() {
$distconfid = 'debian90';
$distid = 'debian60';
$distbaseid = 'debian';
$distsupported = true;
swriteln("Operating System: <strong>Debian 9.0 (Stretch)</strong> or compatible\n");
} elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) {
$distname = 'Debian';
......@@ -235,6 +243,7 @@ function get_distname() {
$distid = 'debian60';
$distconfid = 'debiantesting';
$distbaseid = 'debian';
$distsupported = true;
swriteln("Operating System: Debian Testing\n");
} else {
$distname = 'Debian';
......@@ -242,6 +251,7 @@ function get_distname() {
$distid = 'debian60';
$distconfid = 'debian90';
$distbaseid = 'debian';
$distsupported = true;
swriteln("Operating System: Debian or compatible, unknown version.\n");
}
}
......@@ -259,6 +269,7 @@ function get_distname() {
$distver = 'Ceres';
$distid = 'debiantesting';
$distbaseid = 'debian';
$distsupported = true;
swriteln("Operating System: Devuan Unstable (Ceres) or compatible\n");
}
}
......@@ -282,12 +293,14 @@ function get_distname() {
$distver = '11.2';
$distid = 'opensuse112';
$distbaseid = 'opensuse';
$distsupported = true;
swriteln("Operating System: openSUSE 11.2 or compatible\n");
} else {
$distname = 'openSUSE';
$distver = 'Unknown';
$distid = 'opensuse112';
$distbaseid = 'opensuse';
$distsupported = true;
swriteln("Operating System: openSUSE or compatible, unknown version.\n");
}
}
......@@ -321,6 +334,7 @@ function get_distname() {
$distver = '5.2';
$distid = 'centos52';
$distbaseid = 'fedora';
$distsupported = true;
swriteln("Operating System: CentOS 5.2 or compatible\n");
} elseif(stristr($content, 'CentOS release 5.3 (Final)')) {
$distname = 'CentOS';
......@@ -347,6 +361,8 @@ function get_distname() {
$var=explode(" ", $content);
$var=explode(".", $var[3]);
$var=$var[0].".".$var[1];
$distver = $var;
$distsupported = true;
if($var=='7.0' || $var=='7.1') {
$distid = 'centos70';
} else {
......@@ -372,6 +388,7 @@ function get_distname() {
$distver = $version[0][0].$version[0][1];
$distid = 'gentoo';
$distbaseid = 'gentoo';
$distsupported = true;
swriteln("Operating System: Gentoo $distver or compatible\n");
} else {
......@@ -381,7 +398,7 @@ function get_distname() {
// Set $distconfid to distid, if no different id for the config is defined
if(!isset($distconfid)) $distconfid = $distid;
return array('name' => $distname, 'version' => $distver, 'id' => $distid, 'confid' => $distconfid, 'baseid' => $distbaseid);
return array('name' => $distname, 'version' => $distver, 'id' => $distid, 'confid' => $distconfid, 'baseid' => $distbaseid, 'supported' => $distsupported);
}
function sread() {
......@@ -970,20 +987,20 @@ function getapacheversion($get_minor = false) {
elseif(is_installed('apachectl')) $cmd = 'apachectl -v';
else {
ilog("Could not check apache version, apachectl not found.");
return '2.2';
return '2.4';
}
exec($cmd, $output, $return_var);
if($return_var != 0 || !$output[0]) {
ilog("Could not check apache version, apachectl did not return any data.");
return '2.2';
return '2.4';
}
if(preg_match('/version:\s*Apache\/(\d+)(\.(\d+)(\.(\d+))*)?(\D|$)/i', $output[0], $matches)) {
return $matches[1] . (isset($matches[3]) ? '.' . $matches[3] : '') . (isset($matches[5]) && $get_minor == true ? '.' . $matches[5] : '');
} else {
ilog("Could not check apache version, did not find version string in apachectl output.");
return '2.2';
return '2.4';
}
}
......
This diff is collapsed.
......@@ -103,7 +103,8 @@ function checkDbHealth() {
$notok = array();
echo "Checking ISPConfig database .. ";
exec("mysqlcheck -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -p".escapeshellarg($conf['mysql']['admin_password'])." -P ".escapeshellarg($conf['mysql']['port'])." -r ".escapeshellarg($conf["mysql"]["database"]), $result);
$result = null;
exec("mysqlcheck -h ".escapeshellarg($conf['mysql']['host'])." -u ".escapeshellarg($conf['mysql']['admin_user'])." -p".escapeshellarg($conf['mysql']['admin_password'])." -P ".escapeshellarg($conf['mysql']['port'])." ".escapeshellarg($conf["mysql"]["database"]), $result);
for( $i=0; $i<sizeof($result);$i++) {
if ( substr($result[$i], -2) != "OK" ) {
$notok[] = $result[$i];
......@@ -154,7 +155,6 @@ function updateDbAndIni() {
$conf['services']['dns'] = ($tmp['dns_server'] == 1)?true:false;
$conf['services']['file'] = ($tmp['file_server'] == 1)?true:false;
$conf['services']['db'] = ($tmp['db_server'] == 1)?true:false;
$conf['services']['vserver'] = ($tmp['vserver_server'] == 1)?true:false;
$conf['services']['proxy'] = (isset($tmp['proxy_server']) && $tmp['proxy_server'] == 1)?true:false;
$conf['services']['firewall'] = (isset($tmp['firewall_server']) && $tmp['firewall_server'] == 1)?true:false;
......@@ -333,8 +333,6 @@ function updateDbAndIni() {
$tpl_ini_array['web']['group'] = $conf['apache']['group'];
$tpl_ini_array['web']['php_ini_path_apache'] = $conf['apache']['php_ini_path_apache'];
$tpl_ini_array['web']['php_ini_path_cgi'] = $conf['apache']['php_ini_path_cgi'];
$tpl_ini_array['mail']['pop3_imap_daemon'] = ($conf['dovecot']['installed'] == true)?'dovecot':'courier';
$tpl_ini_array['mail']['mail_filter_syntax'] = ($conf['dovecot']['installed'] == true)?'sieve':'maildrop';
$tpl_ini_array['dns']['bind_user'] = $conf['bind']['bind_user'];
$tpl_ini_array['dns']['bind_group'] = $conf['bind']['bind_group'];
$tpl_ini_array['dns']['bind_zonefiles_dir'] = $conf['bind']['bind_zonefiles_dir'];
......@@ -352,8 +350,6 @@ function updateDbAndIni() {
$tpl_ini_array['web']['php_fpm_start_port'] = $conf['nginx']['php_fpm_start_port'];
$tpl_ini_array['web']['php_fpm_socket_dir'] = $conf['nginx']['php_fpm_socket_dir'];
$tpl_ini_array['xmpp']['xmpp_daemon'] = ($conf['metronome']['installed'] == true)?'metronome':'prosody';
if ($conf['nginx']['installed'] == true) {
$tpl_ini_array['web']['server_type'] = 'nginx';
$tpl_ini_array['global']['webserver'] = 'nginx';
......@@ -439,11 +435,16 @@ function setDefaultServers(){
* @param $servicename string the name of the Database-Field in "servers" for this service
* @param $detected_value boolean The result of service detection
*/
function check_service_config_state($servicename, $detected_value) {
global $current_svc_config, $inst, $conf;
function check_service_config_state($servicename, $detected_value, $use_current_config = null) {
global $current_svc_config, $inst;
if ($current_svc_config[$servicename] == 1) $current_state = 1;
else $current_state = 0;
if(is_array($use_current_config)) {
if ($use_current_config[$servicename] == 1) $current_state = 1;
else $current_state = 0;
} else {
if ($current_svc_config[$servicename] == 1) $current_state = 1;
else $current_state = 0;
}
if ($detected_value) $detected_value = 1;
else $detected_value = 0;
......
ALTER TABLE client ADD COLUMN limit_mailmailinglist int(11) NOT NULL default '-1';
ALTER TABLE client_template ADD COLUMN limit_mailmailinglist int(11) NOT NULL default '-1';
CREATE TABLE IF NOT EXISTS `mail_mailinglist` (
`mailinglist_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) NOT NULL,
`sys_perm_group` varchar(5) character set ucs2 NOT NULL,
`sys_perm_other` varchar(5) NOT NULL,
`server_id` int(11) unsigned NOT NULL default '0',
`domain` varchar(255) NOT NULL,
`listname` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`mailinglist_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
DROP TABLE `mail_mailman_domain`;
\ No newline at end of file
ALTER TABLE `cron` CHANGE `command` `command` TEXT NOT NULL;
ALTER TABLE `client` ADD `limit_openvz_vm` int(11) NOT NULL DEFAULT '0' AFTER `limit_mailmailinglist` ,
ALTER TABLE `client` ADD `limit_openvz_vm` int(11) NOT NULL DEFAULT '0' AFTER `limit_maildomain`,
ADD `limit_openvz_vm_template_id` int(11) NOT NULL DEFAULT '0' AFTER `limit_openvz_vm`;
\ No newline at end of file
ALTER TABLE `client_template` ADD `limit_openvz_vm` int(11) NOT NULL DEFAULT '0' AFTER `limit_mailmailinglist` ,
ALTER TABLE `client_template` ADD `limit_openvz_vm` int(11) NOT NULL DEFAULT '0' AFTER `limit_maildomain` ,
ADD `limit_openvz_vm_template_id` int(11) NOT NULL DEFAULT '0' AFTER `limit_openvz_vm`;
\ No newline at end of file
......@@ -95,15 +95,6 @@ ALTER TABLE `mail_forwarding`
CHANGE `source` `source` varchar(255) NOT NULL DEFAULT '',
CHANGE `active` `active` enum('n','y') NOT NULL DEFAULT 'n';
ALTER TABLE `mail_mailinglist`
CHANGE `sys_perm_user` `sys_perm_user` varchar(5) NOT NULL DEFAULT '',
CHANGE `sys_perm_group` `sys_perm_group` varchar(5) NOT NULL DEFAULT '',
CHANGE `sys_perm_other` `sys_perm_other` varchar(5) NOT NULL DEFAULT '',
CHANGE `domain` `domain` varchar(255) NOT NULL DEFAULT '',
CHANGE `listname` `listname` varchar(255) NOT NULL DEFAULT '',
CHANGE `email` `email` varchar(255) NOT NULL DEFAULT '',
CHANGE `password` `password` varchar(255) NOT NULL DEFAULT '';
ALTER TABLE `mail_traffic`
CHANGE `mailuser_id` `mailuser_id` int(11) unsigned NOT NULL DEFAULT '0',
CHANGE `month` `month` char(7) NOT NULL DEFAULT '',
......
......@@ -10,6 +10,6 @@ UPDATE client SET db_servers = default_dbserver WHERE (db_servers = '' OR db_ser
UPDATE client SET dns_servers = default_dnsserver WHERE (dns_servers = '' OR dns_servers IS NULL);
ALTER TABLE `client_template` ADD `default_slave_dnsserver` INT NOT NULL DEFAULT '0' AFTER `limit_dns_slave_zone`;
ALTER TABLE `client_template` ADD `mail_servers` TEXT NULL DEFAULT NULL AFTER `template_type`;
ALTER TABLE `client_template` ADD `web_servers` TEXT NULL DEFAULT NULL AFTER `limit_xmpp_httparchive`;
ALTER TABLE `client_template` ADD `web_servers` TEXT NULL DEFAULT NULL AFTER `mail_servers`;
ALTER TABLE `client_template` ADD `dns_servers` TEXT NULL DEFAULT NULL AFTER `limit_aps`;
ALTER TABLE `client_template` ADD `db_servers` TEXT NULL DEFAULT NULL AFTER `limit_dns_record`;
\ No newline at end of file
......@@ -18,4 +18,4 @@ ALTER TABLE `dns_rr` CHANGE `data` `data` TEXT NOT NULL;
ALTER TABLE `web_database` CHANGE `database_quota` `database_quota` INT(11) NULL DEFAULT NULL;
ALTER TABLE `web_domain` ADD `log_retention` INT NOT NULL DEFAULT '30' ;
ALTER TABLE spamfilter_policy CHANGE spam_tag_level spam_tag_level DECIMAL(5,2) NULL DEFAULT NULL, CHANGE spam_tag2_level spam_tag2_level DECIMAL(5,2) NULL DEFAULT NULL, CHANGE spam_kill_level spam_kill_level DECIMAL(5,2) NULL DEFAULT NULL, CHANGE spam_dsn_cutoff_level spam_dsn_cutoff_level DECIMAL(5,2) NULL DEFAULT NULL, CHANGE spam_quarantine_cutoff_level spam_quarantine_cutoff_level DECIMAL(5,2) NULL DEFAULT NULL;
UPDATE `web_database` as d LEFT JOIN `web_domain` as w ON (w.domain_id = d.parent_domain_id) SET d.parent_domain_id = 0 WHERE w.domain_id IS NULL AND d.parent_domain_id != 0 AND (SELECT EXISTS(SELECT * FROM web_domain));
\ No newline at end of file
UPDATE `web_database` as d LEFT JOIN `web_domain` as w ON (w.domain_id = d.parent_domain_id) SET d.parent_domain_id = 0 WHERE w.domain_id IS NULL AND d.parent_domain_id != 0 AND (SELECT EXISTS(SELECT * FROM web_domain));
......@@ -2,4 +2,4 @@ ALTER TABLE `web_domain` ADD COLUMN `ssl_letsencrypt_exclude` enum('n','y') NOT
ALTER TABLE `remote_user` ADD `remote_access` ENUM('y','n') NOT NULL DEFAULT 'y' AFTER `remote_password`;
ALTER TABLE `remote_user` ADD `remote_ips` TEXT AFTER `remote_access`;
ALTER TABLE `server_php` ADD `active` enum('y','n') NOT NULL DEFAULT 'y' AFTER `php_fpm_pool_dir`;
ALTER TABLE `web_domain` CHANGE `log_retention` `log_retention` INT(11) NOT NULL DEFAULT '10';
\ No newline at end of file
ALTER TABLE `web_domain` CHANGE `log_retention` `log_retention` INT(11) NOT NULL DEFAULT '10';
This diff is collapsed.
Overriding templates
--------------------
Manually altered versions have to be put into `server/conf-custom/install/`, e.g. `/usr/local/ispconfig/server/conf-custom/install/`
This diff is collapsed.
../../server/conf/apache_apps.vhost.master
\ No newline at end of file
This diff is collapsed.
../../server/conf/apache_ispconfig.conf.master
\ No newline at end of file