From 0bc228446c1f680f14aff72dbfd85dc5edd0043e Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Fri, 12 Jul 2013 09:59:37 -0400
Subject: [PATCH] - Changed installer template handling It is now possible to put a customized copy of each .master template file into /usr/local/ispconfig/server/conf-custom/install/ to keep manual changes done in this file. If existing, these .master files are used on ISPConfig upgrade instead of the provided installer templates.
---
install/dist/lib/gentoo.lib.php | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index bc6b499..194c837 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -165,7 +165,7 @@
$this->write_config_file($configfile, $content);
//* Writing the Maildrop mailfilter file
- $content = rf('tpl/mailfilter.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailfilter.master', 'tpl/mailfilter.master');
$content = str_replace('{dist_postfix_vmail_mailbox_base}', $cf['vmail_mailbox_base'], $content);
$this->write_config_file($cf['vmail_mailbox_base'].'/.mailfilter', $content);
@@ -612,7 +612,7 @@
//if ( !is_file($conf['web']['website_basedir'].'/php-fcgi-scripts/apps/.php-fcgi-starter') )
//{
- $content = rf('tpl/apache_apps_fcgi_starter.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_apps_fcgi_starter.master', 'tpl/apache_apps_fcgi_starter.master');
$content = str_replace('{fastcgi_bin}', $conf['fastcgi']['fastcgi_bin'], $content);
$content = str_replace('{fastcgi_phpini_path}', $conf['fastcgi']['fastcgi_phpini_path'], $content);
mkdir($conf['web']['website_basedir'].'/php-fcgi-scripts/apps', 0755, true);
@@ -652,7 +652,7 @@
$apps_vhost_servername = ($conf['web']['apps_vhost_servername'] == '')?'_':$conf['web']['apps_vhost_servername'];
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf('tpl/nginx_apps.vhost.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_apps.vhost.master', 'tpl/nginx_apps.vhost.master');
if($conf['web']['apps_vhost_ip'] == '_default_'){
$apps_vhost_ip = '';
@@ -678,7 +678,7 @@
// PHP-FPM
// Dont just copy over the php-fpm pool template but add some custom settings
- $content = rf('tpl/apps_php_fpm_pool.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apps_php_fpm_pool.conf.master', 'tpl/apps_php_fpm_pool.conf.master');
$content = str_replace('{fpm_pool}', 'apps', $content);
//$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
@@ -943,7 +943,7 @@
$this->write_config_file($vhost_path, $content);
if(!is_file('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter')) {
- $content = rf('tpl/apache_ispconfig_fcgi_starter.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig_fcgi_starter.master', 'tpl/apache_ispconfig_fcgi_starter.master');
$content = str_replace('{fastcgi_bin}', $conf['fastcgi']['fastcgi_bin'], $content);
$content = str_replace('{fastcgi_phpini_path}', $conf['fastcgi']['fastcgi_phpini_path'], $content);
@mkdir('/var/www/php-fcgi-scripts/ispconfig', 0755, true);
@@ -961,7 +961,7 @@
$vhost_conf_enabled_dir = $conf['nginx']['vhost_conf_enabled_dir'];
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf('tpl/nginx_ispconfig.vhost.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_ispconfig.vhost.master', 'tpl/nginx_ispconfig.vhost.master');
$content = str_replace('{vhost_port}', $conf['nginx']['vhost_port'], $content);
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
@@ -988,7 +988,7 @@
// PHP-FPM
// Dont just copy over the php-fpm pool template but add some custom settings
- $content = rf('tpl/php_fpm_pool.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/php_fpm_pool.conf.master', 'tpl/php_fpm_pool.conf.master');
$content = str_replace('{fpm_pool}', 'ispconfig', $content);
//$content = str_replace('{fpm_port}', $conf['nginx']['php_fpm_start_port'], $content);
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
--
Gitblit v1.9.1