@@ -106,7 +106,19 @@ function update($event_name, $data) {
106106 $ vhost_port_listen = '# ' ;
107107 }
108108 $ tpl ->setVar ('vhost_port_listen ' , $ vhost_port_listen );
109-
109+
110+ /* Check if SSL should be enabled: */
111+ if (is_file ('/usr/local/ispconfig/interface/ssl/ispserver.crt ' ) && is_file ('/usr/local/ispconfig/interface/ssl/ispserver.key ' )) {
112+ $ tpl ->setVar ('ssl_comment ' ,'' );
113+ } else {
114+ $ tpl ->setVar ('ssl_comment ' ,'# ' );
115+ }
116+ 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 ' )) {
117+ $ tpl ->setVar ('ssl_bundle_comment ' ,'' );
118+ } else {
119+ $ tpl ->setVar ('ssl_bundle_comment ' ,'# ' );
120+ }
121+
110122 $ mail_config = $ app ->getconf ->get_server_config ($ conf ['server_id ' ], 'mail ' );
111123 if ($ mail_config ['content_filter ' ] == 'rspamd ' ){
112124 $ use_rspamd = true ;
@@ -194,7 +206,7 @@ function update($event_name, $data) {
194206 }
195207 $ content = str_replace ('{use_tcp} ' , $ use_tcp , $ content );
196208 $ content = str_replace ('{use_socket} ' , $ use_socket , $ content );
197-
209+
198210 $ mail_config = $ app ->getconf ->get_server_config ($ conf ['server_id ' ], 'mail ' );
199211 if ($ mail_config ['content_filter ' ] == 'rspamd ' ){
200212 $ use_rspamd = '' ;
0 commit comments