Bug#707892: don't assume apache2 is running 24 hours a day when rotating logs
Package: apache2
Version: 2.4.4-2
File: /etc/logrotate.d/apache2
Gentlemen,
/etc/logrotate.d/apache2
/var/log/apache2/*.log {
...
postrotate
/etc/init.d/apache2 reload > /dev/null
will always fail,
and will always send root email every single day:
From: Anacron <root@...>
Subject: Anacron job 'cron.daily' on jidanni2
To: root@...
/etc/cron.daily/logrotate:
error: error running shared postrotate script for '/var/log/apache2/*.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1
if the user does not choose to start apache2 at boot.
I.e., the user has apache2 installed, but does not choose to run it all
day long. (Using sysv-rc-conf to disable it.)
Therefore you need to make sure you don't return an error in the case it
is not running p l e a s e!
Reply to: