From 3e0034c1dc3eb944d4e275b62c314cf01dbeda96 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 29 Jun 2010 08:40:00 -0400
Subject: [PATCH] Implemented: FS#1109 - Rotate website error logs and ispconfig log

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

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 2725904..27669ff 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -544,7 +544,7 @@
 
 		//** We have to change the permissions of the courier authdaemon directory to make it accessible for maildrop.
 		$command = 'chmod 755  /var/run/courier/authdaemon/';
-		caselog($command.' &> /dev/null', __FILE__, __LINE__, 'EXECUTED: '.$command, 'Failed to execute the command '.$command);
+		if(is_file('/var/run/courier/authdaemon/')) caselog($command.' &> /dev/null', __FILE__, __LINE__, 'EXECUTED: '.$command, 'Failed to execute the command '.$command);
 
 		//* Changing maildrop lines in posfix master.cf
 		if(is_file($config_dir.'/master.cf')) {
@@ -852,6 +852,7 @@
 		//exec('mkdir -p '.$config_dir.'/conf/ChrootEveryone');
 		exec('echo "yes" > '.$config_dir.'/conf/ChrootEveryone');
 		exec('echo "yes" > '.$config_dir.'/conf/BrokenClientsCompatibility');
+		exec('echo "yes" > '.$config_dir.'/conf/DisplayDotFiles');
 
 		if(is_file('/etc/default/pure-ftpd-common')) {
 			replaceLine('/etc/default/pure-ftpd-common','STANDALONE_OR_INETD=inetd','STANDALONE_OR_INETD=standalone',1,0);
@@ -1413,7 +1414,7 @@
 
 		//* Add Log-Rotation
 		if (is_dir('/etc/logrotate.d')) {
-			unlink('/etc/logrotate.d/logispc3');
+			@unlink('/etc/logrotate.d/logispc3'); // ignore, if the file is not there
 			$fh = fopen('/etc/logrotate.d/logispc3', 'w');
 			fwrite($fh,
 					"/var/log/ispconfig/ispconfig.log { \n" .

--
Gitblit v1.9.1