diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index a4df4d8328c314ed192eec569e7caa7476a095b6..c1ed313355c189458c44e669e15478e93174b91a 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -431,8 +431,12 @@ function check_service_config_state($servicename, $detected_value) { else $current_state = 0; if ($detected_value != $current_state) { - if ($inst->simple_query('Service \''.$servicename.'\' '.($detected_value ? 'has been' : 'has not been').' detected ('.($current_state ? 'strongly recommended, currently enabled' : 'currently disabled').') do you want to '.($detected_value ? 'enable and configure' : 'disable').' it? ', array('yes', 'no'), ($current_state ? 'yes' : 'no'), 'svc_detect_change_'.$servicename) == 'yes') return $detected_value; - else return $current_state; + $answer = $inst->simple_query('Service \''.$servicename.'\' '.($detected_value ? 'has been' : 'has not been').' detected ('.($current_state ? 'strongly recommended, currently enabled' : 'currently disabled').') do you want to '.($detected_value ? 'enable and configure' : 'disable').' it? ', array('yes', 'no'), ($current_state ? 'yes' : 'no'), 'svc_detect_change_'.$servicename) + if ($answer == 'yes') return $detected_value; + else { + if ($servicename == 'web_server') echo "If ISPConfig-Panel is installed on this Server we will configure the Web Server anyways but will not enable it in ISPConfig.\n"; + return $current_state; + } } else return $current_state; } diff --git a/install/update.php b/install/update.php index 6cd18a3109e1ad5857db2093a69ed060fe53e5bd..0012b7ed86922ca57705138653e19e618fc402c9 100644 --- a/install/update.php +++ b/install/update.php @@ -316,6 +316,13 @@ $conf['services']['vserver'] = check_service_config_state('vserver_server', $con $conf['services']['db'] = check_service_config_state('db_server', true); /* Will always offer as MySQL is of course installed on this host as it's a requirement for ISPC to work... */ unset($current_svc_config); +//** Is the ISPConfg Panel installed on this host? This might partially override user's preferences later. +if($conf['apache']['installed'] == true){ + if(!is_file($conf['apache']['vhost_conf_dir'].'/ispconfig.vhost')) $inst->install_ispconfig_interface = false; +} +if($conf['nginx']['installed'] == true){ + if(!is_file($conf['nginx']['vhost_conf_dir'].'/ispconfig.vhost')) $inst->install_ispconfig_interface = false; +} //** Shall the services be reconfigured during update $reconfigure_services_answer = $inst->simple_query('Reconfigure Services?', array('yes', 'no', 'selected'), 'yes','reconfigure_services'); @@ -391,7 +398,7 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel } } - if($conf['services']['web']) { + if($conf['services']['web'] || $inst->install_ispconfig_interface) { if($conf['pureftpd']['installed'] == true && $inst->reconfigure_app('Pureftpd', $reconfigure_services_answer)) { //** Configure Pureftpd @@ -462,14 +469,8 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel //** Configure ISPConfig swriteln('Updating ISPConfig'); -if($conf['apache']['installed'] == true){ - if(!is_file($conf['apache']['vhost_conf_dir'].'/ispconfig.vhost')) $inst->install_ispconfig_interface = false; -} -if($conf['nginx']['installed'] == true){ - if(!is_file($conf['nginx']['vhost_conf_dir'].'/ispconfig.vhost')) $inst->install_ispconfig_interface = false; -} -if ($conf['services']['web'] && $inst->install_ispconfig_interface) { +if ($inst->install_ispconfig_interface) { //** Customise the port ISPConfig runs on $ispconfig_port_number = get_ispconfig_port_number(); if($autoupdate['ispconfig_port'] == 'default') $autoupdate['ispconfig_port'] = $ispconfig_port_number;