From 897af06af9522ded99b1e0f46730299e89856ffe Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 11 Jun 2012 05:00:57 -0400
Subject: [PATCH] Updated version number to 3.0.4.6

---
 install/dist/lib/gentoo.lib.php |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index 7a6770b..38173fb 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -80,10 +80,8 @@
 			caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");		
 		}
 
+		//* These postconf commands will be executed on installation and update
 		$postconf_commands = array (
-			'myhostname = '.$conf['hostname'],
-			'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain',
-			'mynetworks = 127.0.0.0/8 [::1]/128',
 			'virtual_alias_domains =',
 			'virtual_alias_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_forwardings.cf, mysql:'.$config_dir.'/mysql-virtual_email2email.cf',
 			'virtual_mailbox_domains = proxy:mysql:'.$config_dir.'/mysql-virtual_domains.cf',
@@ -112,6 +110,15 @@
 			'nested_header_checks = regexp:'.$config_dir.'/nested_header_checks',
 			'body_checks = regexp:'.$config_dir.'/body_checks'
 		);
+		
+		//* These postconf commands will be executed on installation only
+		if($this->is_update == false) {
+			$postconf_commands = array_merge($postconf_commands,array(
+				'myhostname = '.$conf['hostname'],
+				'mydestination = '.$conf['hostname'].', localhost, localhost.localdomain',
+				'mynetworks = 127.0.0.0/8 [::1]/128'
+			));
+		}
 		
 		//* Create the header and body check files
 		touch($config_dir.'/header_checks');
@@ -867,10 +874,9 @@
 			chgrp($install_dir.'/server/lib/mysql_clientdb.conf', 'root');
 		}
 		
-		if(is_file($install_dir.'/interface/invoices')) {
-			chmod($install_dir.'/interface/invoices', 0770);
-			chown($install_dir.'/interface/invoices', 'ispconfig');
-			chgrp($install_dir.'/interface/invoices', 'ispconfig');
+		if(is_dir($install_dir.'/interface/invoices')) {
+			exec('chmod -R 770 '.escapeshellarg($install_dir.'/interface/invoices'));
+			exec('chown -R ispconfig:ispconfig '.escapeshellarg($install_dir.'/interface/invoices'));
 		}
 		
 		// TODO: FIXME: add the www-data user to the ispconfig group. This is just for testing

--
Gitblit v1.9.1