Skip to content
Snippets Groups Projects
Commit e4e7ed27 authored by Thom's avatar Thom :tools:
Browse files

Use the correct path to search for the SSL cert (#5719)

parent a28d7f1e
No related branches found
No related tags found
No related merge requests found
...@@ -107,6 +107,18 @@ class apps_vhost_plugin { ...@@ -107,6 +107,18 @@ class apps_vhost_plugin {
} }
$tpl->setVar('vhost_port_listen', $vhost_port_listen); $tpl->setVar('vhost_port_listen', $vhost_port_listen);
/* Check if SSL should be enabled: */
if(is_file('/usr/local/ispconfig/interface/ssl/ispserver.crt') && is_file('/usr/local/ispconfig/interface/ssl/ispserver.key')) {
$tpl->setVar('ssl_comment','');
} else {
$tpl->setVar('ssl_comment','#');
}
if(is_file('/usr/local/ispconfig/interface/ssl/ispserver.crt') && is_file('/usr/local/ispconfig/interface/ssl/ispserver.key') && is_file('/usr/local/ispconfig/interface/ssl/ispserver.bundle')) {
$tpl->setVar('ssl_bundle_comment','');
} else {
$tpl->setVar('ssl_bundle_comment','#');
}
$mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail'); $mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail');
if($mail_config['content_filter'] == 'rspamd'){ if($mail_config['content_filter'] == 'rspamd'){
$use_rspamd = true; $use_rspamd = true;
...@@ -127,17 +139,6 @@ class apps_vhost_plugin { ...@@ -127,17 +139,6 @@ class apps_vhost_plugin {
$content = str_replace('{apps_vhost_basedir}', $web_config['website_basedir'], $content); $content = str_replace('{apps_vhost_basedir}', $web_config['website_basedir'], $content);
$content = str_replace('{vhost_port_listen}', $vhost_port_listen, $content); $content = str_replace('{vhost_port_listen}', $vhost_port_listen, $content);
/* end of backwards compatibility section */ /* end of backwards compatibility section */
/* Check if SSL should be enabled: */
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
$tpl->setVar('ssl_comment','');
} else {
$tpl->setVar('ssl_comment','#');
}
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key') && is_file($install_dir.'/interface/ssl/ispserver.bundle')) {
$tpl->setVar('ssl_bundle_comment','');
} else {
$tpl->setVar('ssl_bundle_comment','#');
}
$app->system->file_put_contents("$vhost_conf_dir/apps.vhost", $content); $app->system->file_put_contents("$vhost_conf_dir/apps.vhost", $content);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment