It would be nice if applications that potentially generate large log files,
such as Apache, could provide a sample logrotate file. Maybe with a USE
While logrotate files are not hard to create, sometimes the hard part
is the postrotate script.
How about this one for Apache2?
/bin/kill -HUP `cat /var/run/apache2.pid 2>/dev/null` 2> /dev/null || true
Steps to Reproduce:
Added to 2.0.49. Thanks for the bug report and suggestion.
The sample logrotate configuration placed into the portage tree on 2-April-2004 (/var/www/www.gentoo.org/raw_cvs/gentoo-x86/net-www/apache/files/apache2,v 1.1) has errors which are picked up daily by the logrotate cron job. Specifically, "notifempty" on line 8 is misspelled and line 10 should be preceded by "postrotate". The following is a corrected version:
/etc/init.d/apache2 reload > /dev/null 2>&1 || true