@@ -745,7 +745,7 @@ public function process_postfix_config($configfile) {
745745 copy ($ full_file_name , $ config_dir .$ configfile .'~ ' );
746746 chmod ($ config_dir .$ configfile .'~ ' ,0600 );
747747 }
748-
748+
749749 //* Replace variables in config file template
750750 $ content = rfsel ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/ ' .$ configfile .'.master ' , 'tpl/ ' .$ configfile .'.master ' );
751751 $ content = str_replace ('{mysql_server_ispconfig_user} ' , $ conf ['mysql ' ]['ispconfig_user ' ], $ content );
@@ -754,13 +754,13 @@ public function process_postfix_config($configfile) {
754754 $ content = str_replace ('{mysql_server_ip} ' , $ conf ['mysql ' ]['ip ' ], $ content );
755755 $ content = str_replace ('{server_id} ' , $ conf ['server_id ' ], $ content );
756756 wf ($ full_file_name , $ content );
757-
757+
758758 //* Changing mode and group of the new created config file
759759 caselog ('chmod u=rw,g=r,o= ' .escapeshellarg ($ full_file_name ).' &> /dev/null ' ,
760760 __FILE__ , __LINE__ , 'chmod on ' .$ full_file_name , 'chmod on ' .$ full_file_name .' failed ' );
761761 caselog ('chgrp ' .escapeshellarg ($ postfix_group ).' ' .escapeshellarg ($ full_file_name ).' &> /dev/null ' ,
762762 __FILE__ , __LINE__ , 'chgrp on ' .$ full_file_name , 'chgrp on ' .$ full_file_name .' failed ' );
763-
763+
764764 }
765765
766766 public function configure_jailkit () {
@@ -1097,7 +1097,7 @@ public function configure_postfix($options = '') {
10971097 }
10981098
10991099 unset($ server_ini_array );
1100-
1100+
11011101 $ myhostname = str_replace ('. ' ,'\. ' ,$ conf ['hostname ' ]);
11021102
11031103 $ postconf_placeholders = array ('{config_dir} ' => $ config_dir ,
@@ -1680,7 +1680,7 @@ public function configure_amavis() {
16801680
16811681 public function configure_rspamd () {
16821682 global $ conf ;
1683-
1683+
16841684 //* These postconf commands will be executed on installation and update
16851685 $ server_ini_rec = $ this ->db ->queryOneRecord ("SELECT config FROM ?? WHERE server_id = ? " , $ conf ["mysql " ]["database " ] . '.server ' , $ conf ['server_id ' ]);
16861686 $ server_ini_array = ini_to_array (stripslashes ($ server_ini_rec ['config ' ]));
@@ -2503,6 +2503,16 @@ public function configure_apps_vhost() {
25032503 $ tpl ->setVar ('apps_vhost_dir ' ,$ conf ['web ' ]['website_basedir ' ].'/apps ' );
25042504 $ tpl ->setVar ('apps_vhost_basedir ' ,$ conf ['web ' ]['website_basedir ' ]);
25052505 $ tpl ->setVar ('apps_vhost_servername ' ,$ apps_vhost_servername );
2506+ if (is_file ($ install_dir .'/interface/ssl/ispserver.crt ' ) && is_file ($ install_dir .'/interface/ssl/ispserver.key ' )) {
2507+ $ tpl ->setVar ('ssl_comment ' ,'' );
2508+ } else {
2509+ $ tpl ->setVar ('ssl_comment ' ,'# ' );
2510+ }
2511+ 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 ' )) {
2512+ $ tpl ->setVar ('ssl_bundle_comment ' ,'' );
2513+ } else {
2514+ $ tpl ->setVar ('ssl_bundle_comment ' ,'# ' );
2515+ }
25062516 $ tpl ->setVar ('apache_version ' ,getapacheversion ());
25072517 if ($ this ->is_update == true ) {
25082518 $ tpl ->setVar ('logging ' ,get_logging_state ());
0 commit comments