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/fedora.lib.php |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index 3b0d6cd..2eca528 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -83,10 +83,8 @@
 		$command = 'useradd -g '.$cf['vmail_groupname'].' -u '.$cf['vmail_userid'].' '.$cf['vmail_username'].' -d '.$cf['vmail_mailbox_base'].' -m';
 		if(!is_user($cf['vmail_username'])) 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',
@@ -117,6 +115,15 @@
 			'body_checks = regexp:'.$config_dir.'/body_checks',
 			'inet_interfaces = all'
 		);
+		
+		//* 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');
@@ -1045,9 +1052,8 @@
 		replaceLine('/etc/sudoers','Defaults    requiretty','#Defaults    requiretty',0,0);
 		
 		if(is_dir($install_dir.'/interface/invoices')) {
-			chmod($install_dir.'/interface/invoices', 0770);
-			chown($install_dir.'/interface/invoices', 'ispconfig');
-			chgrp($install_dir.'/interface/invoices', 'ispconfig');
+			exec('chmod -R 770 '.escapeshellarg($install_dir.'/interface/invoices'));
+			exec('chown -R ispconfig:ispconfig '.escapeshellarg($install_dir.'/interface/invoices'));
 		}
 		
 	}

--
Gitblit v1.9.1