diff --git a/install/install.php b/install/install.php index a894ed45b4d9f672244f3de1a4e7453e4e812c35..8667a9d3bb2c44e4a027614b5c9bb4f4eecb47fe 100644 --- a/install/install.php +++ b/install/install.php @@ -545,6 +545,7 @@ if($conf['apache']['installed'] == true) { } //** Configure ISPConfig :-) +$issue_asked = false; $issue_tried = false; $install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] == 'y')?'n':'y'; if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPConfig Web Interface', array('y', 'n'), $install_ispconfig_interface_default,'install_ispconfig_web_interface')) == 'y') { @@ -574,6 +575,7 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPCon $inst->make_ispconfig_ssl_cert(); $issue_tried = true; } + $issue_asked = true; $inst->install_ispconfig_interface = true; } else { @@ -581,12 +583,14 @@ if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPCon } // Create SSL certs for non-webserver(s)? -if(!file_exists('/usr/local/ispconfig/interface/ssl/ispserver.crt')) { - if(!$issue_tried && strtolower($inst->simple_query('Do you want to create SSL certs for your server?', array('y', 'n'), 'y','create_ssl_server_certs')) == 'y') { - $inst->make_ispconfig_ssl_cert(); - } -} else { - swriteln('Certificate exists. Not creating a new one.'); +if(!$issue_asked) { + if(!file_exists('/usr/local/ispconfig/interface/ssl/ispserver.crt')) { + if(!$issue_tried && strtolower($inst->simple_query('Do you want to create SSL certs for your server?', array('y', 'n'), 'y','create_ssl_server_certs')) == 'y') { + $inst->make_ispconfig_ssl_cert(); + } + } else { + swriteln('Certificate exists. Not creating a new one.'); + } } if($conf['services']['web'] == true) { diff --git a/install/update.php b/install/update.php index 94fca6b101fb29fa4e2bb1f9dbada4ab06d7efab..1e81ac268cd0318feb39f6833a6f86551eee1894 100644 --- a/install/update.php +++ b/install/update.php @@ -519,6 +519,7 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel //** Configure ISPConfig swriteln('Updating ISPConfig'); +$issue_asked = false; $issue_tried = false; // create acme vhost if($conf['nginx']['installed'] == true) { @@ -544,15 +545,18 @@ if ($inst->install_ispconfig_interface) { $inst->make_ispconfig_ssl_cert(); $issue_tried = true; } + $issue_asked = true; } // Create SSL certs for non-webserver(s)? -if(!file_exists('/usr/local/ispconfig/interface/ssl/ispserver.crt')) { - if(!$issue_tried && strtolower($inst->simple_query('Do you want to create SSL certs for your server?', array('y', 'n'), 'y','create_ssl_server_certs')) == 'y') { - $inst->make_ispconfig_ssl_cert(); - } -} else { - swriteln('Certificate exists. Not creating a new one.'); +if(!$issue_asked) { + if(!file_exists('/usr/local/ispconfig/interface/ssl/ispserver.crt')) { + if(!$issue_tried && strtolower($inst->simple_query('Do you want to create SSL certs for your server?', array('y', 'n'), 'y','create_ssl_server_certs')) == 'y') { + $inst->make_ispconfig_ssl_cert(); + } + } else { + swriteln('Certificate exists. Not creating a new one.'); + } } $inst->install_ispconfig();