|
1 | 1 | <?php |
2 | 2 |
|
3 | 3 | /* |
4 | | -Copyright (c) 2007, Till Brehm, projektfarm Gmbh |
| 4 | +Copyright (c) 2007-2010, Till Brehm, projektfarm Gmbh |
5 | 5 | All rights reserved. |
6 | 6 |
|
7 | 7 | Redistribution and use in source and binary forms, with or without modification, |
@@ -154,7 +154,7 @@ public function configure_database() { |
154 | 154 | caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' '".$conf['mysql']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/ispconfig3.sql' &> /dev/null", |
155 | 155 | __FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in ispconfig3.sql'); |
156 | 156 | } else { |
157 | | - 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", |
| 157 | + 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", |
158 | 158 | __FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in ispconfig3.sql'); |
159 | 159 | } |
160 | 160 | $db_tables = $this->db->getTables(); |
@@ -1388,8 +1388,28 @@ public function install_ispconfig() |
1388 | 1388 | exec('mv /usr/local/ispconfig/server/scripts/run-getmail.sh /usr/local/bin/run-getmail.sh'); |
1389 | 1389 | if(is_user('getmail')) exec('chown getmail /usr/local/bin/run-getmail.sh'); |
1390 | 1390 | exec('chmod 744 /usr/local/bin/run-getmail.sh'); |
1391 | | - |
1392 | | - |
| 1391 | + |
| 1392 | + //* Add Log-Rotation |
| 1393 | + if (is_dir('/etc/logrotate.d')){ |
| 1394 | + unlink('/etc/logrotate.d/logispc3'); |
| 1395 | + $fh = fopen('/etc/logrotate.d/logispc3', 'w'); |
| 1396 | + fwrite($fh, |
| 1397 | + "/var/log/ispconfig/ispconfig.log { \n" . |
| 1398 | + " weekly \n" . |
| 1399 | + " missingok \n" . |
| 1400 | + " rotate 4 \n" . |
| 1401 | + " compress \n" . |
| 1402 | + " delaycompress \n" . |
| 1403 | + "} \n" . |
| 1404 | + "/var/log/ispconfig/cron.log { \n" . |
| 1405 | + " weekly \n" . |
| 1406 | + " missingok \n" . |
| 1407 | + " rotate 4 \n" . |
| 1408 | + " compress \n" . |
| 1409 | + " delaycompress \n" . |
| 1410 | + "}"); |
| 1411 | + fclose($fh); |
| 1412 | + } |
1393 | 1413 | } |
1394 | 1414 |
|
1395 | 1415 | public function configure_dbserver() |
|
0 commit comments