diff --git a/docs/INSTALL_DEBIAN_5.0_dovecot_bind.txt b/docs/INSTALL_DEBIAN_5.0_dovecot_bind.txt index 9ee449bb07c3e926b14ee13e58bc47e297117c1a..8a8ccf6fa2a71b8ab4e650a1f1d184bef318ad35 100644 --- a/docs/INSTALL_DEBIAN_5.0_dovecot_bind.txt +++ b/docs/INSTALL_DEBIAN_5.0_dovecot_bind.txt @@ -224,27 +224,6 @@ rsync - fast remote file copy program (for backup) ----------------------------------------------------------------------------------------------------------- -Ispc log files rotate, for now manual add but to add in ispc installer: - -/etc/logrotate.d/logispc3 - -/var/log/ispconfig/ispconfig.log { - weekly - missingok - rotate 4 - compress - delaycompress -} -/var/log/ispconfig/cron.log { - weekly - missingok - rotate 4 - compress - delaycompress -} - - ------------------------------------------------------------------------------------------------------------ Possible errors and their solutions ------------------------------------ diff --git a/docs/INSTALL_DEBIAN_6.0_courier_mydns.txt b/docs/INSTALL_DEBIAN_6.0_courier_mydns.txt index 9ceb9b5cbd5ab7cb5c51e8e3d445aa591364a12a..63d71822569a258be4f1d428c2f4d2ec15223a87 100644 --- a/docs/INSTALL_DEBIAN_6.0_courier_mydns.txt +++ b/docs/INSTALL_DEBIAN_6.0_courier_mydns.txt @@ -360,27 +360,6 @@ rsync - fast remote file copy program (for backup) ----------------------------------------------------------------------------------------------------------- -Ispc log files rotate, for now manual add but to add in ispc installer: - -/etc/logrotate.d/logispc3 - -/var/log/ispconfig/ispconfig.log { - weekly - missingok - rotate 4 - compress - delaycompress -} -/var/log/ispconfig/cron.log { - weekly - missingok - rotate 4 - compress - delaycompress -} - - ------------------------------------------------------------------------------------------------------------ Possible errors and their solutions ------------------------------------ diff --git a/install/install.php b/install/install.php index 5d0d44475b3d0099b29cbdb9feff53e51535c70d..b4d59ee5926972176144cd239a878b941480ebe1 100644 --- a/install/install.php +++ b/install/install.php @@ -1,7 +1,7 @@ /dev/null", __FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in ispconfig3.sql'); } else { - caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' '".$conf['mysql']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/ispconfig3.sql' &> /dev/null", + caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' '".$conf['mysql']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/ispconfig3.sql' &> /dev/null", __FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in ispconfig3.sql'); } $db_tables = $this->db->getTables(); @@ -1388,8 +1388,28 @@ class installer_base { exec('mv /usr/local/ispconfig/server/scripts/run-getmail.sh /usr/local/bin/run-getmail.sh'); if(is_user('getmail')) exec('chown getmail /usr/local/bin/run-getmail.sh'); exec('chmod 744 /usr/local/bin/run-getmail.sh'); - - + + //* Add Log-Rotation + if (is_dir('/etc/logrotate.d')){ + unlink('/etc/logrotate.d/logispc3'); + $fh = fopen('/etc/logrotate.d/logispc3', 'w'); + fwrite($fh, + "/var/log/ispconfig/ispconfig.log { \n" . + " weekly \n" . + " missingok \n" . + " rotate 4 \n" . + " compress \n" . + " delaycompress \n" . + "} \n" . + "/var/log/ispconfig/cron.log { \n" . + " weekly \n" . + " missingok \n" . + " rotate 4 \n" . + " compress \n" . + " delaycompress \n" . + "}"); + fclose($fh); + } } public function configure_dbserver() diff --git a/install/update.php b/install/update.php index 0b1e263fc6e17ac0f1313b063238a639dd6b1d51..d0ec6ffe08355f1742532f60f2d96d4c00074ab5 100644 --- a/install/update.php +++ b/install/update.php @@ -1,7 +1,7 @@