Skip to content

Commit

Permalink
Merge pull request #100 from dterweij/6.1.x
Browse files Browse the repository at this point in the history
Project issue #295.
  • Loading branch information
dterweij committed Feb 22, 2014
2 parents 6c5240f + b6b4a4b commit 09446ed
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 10 deletions.
71 changes: 71 additions & 0 deletions kloxo/file/kloxo.logrotate
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Kloxo, Hosting Control Panel
#
# Copyright (C) 2000-2009 LxLabs
# Copyright (C) 2009-2014 LxCenter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Kloxo LogRotate
# Initial version
# Needs cleanup
# Using this one on LxCenter server
# Created by Danny Terweij <[email protected]>
#
# Defaults to weekly rotates (compressed) and keeps maximum of 8 weeks

/var/log/kloxo/maillog /var/log/kloxo/courier /var/log/kloxo/smtp.log /var/log/kloxo/pureftpd.log {
weekly
rotate 8
create
compress
notifempty
missingok
postrotate
pkill -HUP syslogd
endscript
}
/home/httpd/*/stats/*_log {
weekly
rotate 8
create 0664 apache apache
compress
notifempty
missingok
}

/home/*/__processed_stats/*_log-* {
daily
rotate 30
create 0750 root root
compress
notifempty
missingok
}
/home/kloxo/httpd/lighttpd/*.log {
weekly
rotate 8
create 0664 apache apache
compress
notifempty
missingok
}

/usr/local/lxlabs/ext/php/error.log {
weekly
rotate 8
create 0664 root root
compress
notifempty
missingok
}
18 changes: 8 additions & 10 deletions kloxo/httpdocs/htmllib/lib/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5865,16 +5865,14 @@ function setSomeScript()

function setInitialLogrotate()
{
return; // Kloxo 6.2.0 (#295)
log_cleanup("Initialize logrotate");

if (lxfile_exists("/etc/logrotate.d/kloxo")) {
log_cleanup("- Initialize process");

if (lxfile_exists("../file/kloxo.logrotate")) {
lxfile_cp("../file/kloxo.logrotate", "/etc/logrotate.d/kloxo");
}
}
// Project #295
// Added kloxo 6.1.18
if (lxfile_exists("/etc/logrotate.d/kloxo")) {
if (lxfile_exists("../file/kloxo.logrotate")) {
log_cleanup("Installing kloxo logrotate");
lxfile_cp("../file/kloxo.logrotate", "/etc/logrotate.d/kloxo");
}
}
}

function restart_xinetd_for_pureftp()
Expand Down

0 comments on commit 09446ed

Please sign in to comment.