From c9435bcf367b6a54d396caf9d4fac4c39b43167a Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 29 Aug 2012 05:23:36 -0400
Subject: [PATCH] Fixed: FS#2324 - Moving a mail domain from a client to another doesn't work totally?

---
 install/lib/installer_base.lib.php |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 1933db8..d11acd1 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -900,7 +900,7 @@
 		$content = rf($conf['postfix']['config_dir'].'/master.cf');
 		// Only add the content if we had not addded it before
 		if(!stristr($content,'dovecot/deliver')) {
-			$deliver_content = 'dovecot   unix  -       n       n       -       -       pipe'."\n".'  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}';
+			$deliver_content = 'dovecot   unix  -       n       n       -       -       pipe'."\n".'  flags=DROhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}';
 			af($conf['postfix']['config_dir'].'/master.cf',$deliver_content);
 		}
 		unset($content);
@@ -1650,6 +1650,7 @@
 		$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
 		$content = str_replace('{language}', $conf['language'], $content);
 		$content = str_replace('{timezone}', $conf['timezone'], $content);
+		$content = str_replace('{theme}', $conf['theme'], $content);
 
 		wf($install_dir.'/interface/lib/'.$configfile, $content);
 
@@ -1673,6 +1674,7 @@
 		$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
 		$content = str_replace('{language}', $conf['language'], $content);
 		$content = str_replace('{timezone}', $conf['timezone'], $content);
+		$content = str_replace('{theme}', $conf['theme'], $content);
 
 		wf($install_dir.'/server/lib/'.$configfile, $content);
 
@@ -1957,10 +1959,12 @@
 			touch($conf['ispconfig_log_dir'].'/ispconfig.log');
 		}
 
-		//* Create the ispconfig auth log file
+		//* Create the ispconfig auth log file and set uid/gid
 		if(!is_file($conf['ispconfig_log_dir'].'/auth.log')) {
-			touch($conf['ispconfig_log_dir'].'/auth.log', 0666);
+			touch($conf['ispconfig_log_dir'].'/auth.log');
 		}
+		exec('chown ispconfig:ispconfig '. $conf['ispconfig_log_dir'].'/auth.log');
+		exec('chmod 660 '. $conf['ispconfig_log_dir'].'/auth.log');
 
 		if(is_user('getmail')) {
 			rename($install_dir.'/server/scripts/run-getmail.sh','/usr/local/bin/run-getmail.sh');
@@ -1991,6 +1995,11 @@
 			fclose($fh);
 			*/
 		}
+		
+		//* Remove Domain module as its functions are available in the client module now
+		if(@is_dir('/usr/local/ispconfig/interface/web/domain')) exec('rm -rf /usr/local/ispconfig/interface/web/domain');
+	
+	
 	}
 
 	public function configure_dbserver() {

--
Gitblit v1.9.1