LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 06-30-2004, 03:38 AM   #1
zby
LQ Newbie
 
Registered: Jun 2004
Distribution: Debian
Posts: 8

Rep: Reputation: 0
logrotate appeares to not read the config file


I have my server running Sarge with following logrotate configuration:

In my logrotate.conf:

# see "man logrotate" for details
# rotate log files weekly
weekly
.
.
.
# packages drop log rotation information into this directory
include /etc/logrotate.d



In /etc/logrotate.d/apache

/var/log/apache/*.log {
monthly
missingok
rotate 52
compress
delaycompress
notifempty
create 644 root adm
sharedscripts
postrotate
if [ -f /var/run/apache.pid ]; then \
/etc/init.d/apache stop > /dev/null;
/etc/init.d/apache start > /dev/null; fi
endscript
}


The cron.daily/logrotate file:

test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf

And that's the only place with logrotate in the cron.* directories.
And yet the apache logs are rotated weekly, the web server is not restarted after the rotation and that couses it to loose logs.
Any clues what can couse such behaviour?
 
Old 06-30-2004, 10:34 AM   #2
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
try
"if [ -f /var/run/apache.pid ]; then /etc/init.d/apache reload > /dev/null; fi"
in you /etc/logrotate.d/apache.
i don't know why, but my sys works fine this way (sure - it shouldn't matter if you stop and start or reload apache).
so it also might be another problem, but i think it's worth a try.

sl mritch.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read parameters from config file (file parser?) alaios Programming 8 07-09-2012 11:29 AM
read options from config file biiiep Programming 4 05-05-2005 03:30 AM
Snort refuses to read config file stakhous Linux - Security 4 05-07-2004 08:48 AM
Samba config to allow Windows read-only file attribute changes percheron Linux - Networking 8 09-12-2003 11:56 PM
Unable to read config file............ FXRS Linux - Software 7 07-03-2003 08:36 AM


All times are GMT -5. The time now is 08:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration