[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#288625: apache, logrotate.d file errors when reloads if apache is not running

Package: apache
Version: 1.3.26-0woody6

I've long ignored or disabled the results of /etc/logrotate.d/apache
because I use my own logging system. Today on a fairly virgin box
I went to see exactly what the problem is.

Since "missingok" is in there I was puzzled at what could cause the
problem.  Turns out the postrotate script doesn't check if the installed
apache is running before it reloads it.

This will cause a problem on any box with apache installed but not

--- /root/logrotate.d.apache.orig	Tue Jan  4 13:36:48 2005
+++ /etc/logrotate.d/apache	Tue Jan  4 13:55:47 2005
@@ -8,6 +8,6 @@
 	create 640 root adm
-		/etc/init.d/apache reload > /dev/null
+		[ ! -f /var/run/apache.pid ] || /etc/init.d/apache reload > /dev/null

// George

George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george@galis.org

Reply to: