File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,18 @@ function update($event_name, $data) {
204204 $ use_tcp = '' ;
205205 $ use_socket = '# ' ;
206206 }
207+
208+ /* Check if SSL should be enabled: */
209+ if (is_file ('/usr/local/ispconfig/interface/ssl/ispserver.crt ' ) && is_file ('/usr/local/ispconfig/interface/ssl/ispserver.key ' )) {
210+ $ content = str_replace ('{ssl_comment} ' , '' , $ content );
211+ $ content = str_replace ('{ssl_on} ' , 'ssl ' , $ content );
212+ $ content = str_replace ('{vhost_port} ' , $ web_config ['apps_vhost_port ' ], $ content );
213+ } else {
214+ $ content = str_replace ('{ssl_comment} ' , '# ' , $ content );
215+ $ content = preg_replace ('/(\s)\{ssl_on\}/ ' , '' , $ content );
216+ $ content = str_replace ('{vhost_port} ' , $ web_config ['apps_vhost_port ' ], $ content );
217+ }
218+
207219 $ content = str_replace ('{use_tcp} ' , $ use_tcp , $ content );
208220 $ content = str_replace ('{use_socket} ' , $ use_socket , $ content );
209221
You can’t perform that action at this time.
0 commit comments