@@ -41,7 +41,7 @@ public function configure_mailman($status = 'insert') {
4141 }
4242
4343 // load files
44- $ content = rf ( 'tpl/mm_cfg.py.master ' );
44+ $ content = rfsel ( $ conf [ ' ispconfig_install_dir ' ]. ' /server/conf-custom/install/mm_cfg.py.master ' , 'tpl/mm_cfg.py.master ' );
4545 $ old_file = rf ($ full_file_name );
4646
4747 $ old_options = array ();
@@ -67,7 +67,11 @@ public function configure_mailman($status = 'insert') {
6767 copy ($ full_file_name , $ config_dir .'virtual_to_transport.sh~ ' );
6868 }
6969
70- copy ('tpl/mailman-virtual_to_transport.sh ' ,$ full_file_name );
70+ if (is_file ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/mailman-virtual_to_transport.sh ' )) {
71+ copy ($ conf ['ispconfig_install_dir ' ].'/server/conf-custom/install/mailman-virtual_to_transport.sh ' , $ full_file_name );
72+ } else {
73+ copy ('tpl/mailman-virtual_to_transport.sh ' ,$ full_file_name );
74+ }
7175 chgrp ($ full_file_name ,'mailman ' );
7276 chmod ($ full_file_name ,0750 );
7377
@@ -111,7 +115,7 @@ public function configure_amavis() {
111115 if (is_file ($ conf ["amavis " ]["config_dir " ].'/amavisd.conf ' )) copy ($ conf ["amavis " ]["config_dir " ].'/amavisd.conf ' ,$ conf ["amavis " ]["config_dir " ].'/amavisd.conf~ ' );
112116 if (is_file ($ conf ["amavis " ]["config_dir " ].'/amavisd.conf~ ' )) exec ('chmod 400 ' .$ conf ["amavis " ]["config_dir " ].'/amavisd.conf~ ' );
113117 if (!is_dir ($ conf ["amavis " ]["config_dir " ])) mkdir ($ conf ["amavis " ]["config_dir " ]);
114- $ content = rf ( "tpl/ " .$ configfile .".master " );
118+ $ content = rfsel ( $ conf [ ' ispconfig_install_dir ' ]. ' /server/conf-custom/install/ ' . $ configfile . ' .master ' , "tpl/ " .$ configfile .".master " );
115119 $ content = str_replace ('{mysql_server_ispconfig_user} ' ,$ conf ['mysql ' ]['ispconfig_user ' ],$ content );
116120 $ content = str_replace ('{mysql_server_ispconfig_password} ' ,$ conf ['mysql ' ]['ispconfig_password ' ], $ content );
117121 $ content = str_replace ('{mysql_server_database} ' ,$ conf ['mysql ' ]['database ' ],$ content );
@@ -143,7 +147,7 @@ public function configure_amavis() {
143147 // Only add the content if we had not addded it before
144148 if (!stristr ($ content ,"127.0.0.1:10025 " )) {
145149 unset($ content );
146- $ content = rf ( "tpl/master_cf_amavis.master " );
150+ $ content = rfsel ( $ conf [ ' ispconfig_install_dir ' ]. ' /server/conf-custom/install/master_cf_amavis.master ' , "tpl/master_cf_amavis.master " );
147151 af ($ conf ["postfix " ]["config_dir " ].'/master.cf ' ,$ content );
148152 }
149153 unset($ content );
0 commit comments