sous-chefs / logrotate

Development repository for the logrotate cookbook

Home Page:https://supermarket.chef.io/cookbooks/logrotate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should ensure that /etc/cron.hourly/logrotate exists

nicwaller opened this issue · comments

This cookbook allows the specification of hourly as an option, but it does not guarantee that an hourly cron entry exists.

$ ls -l /etc/cron.{hourly,daily}/logrotate
ls: cannot access /etc/cron.hourly/logrotate: No such file or directory
-rwxr-xr-x 1 root root 372 Jan 22  2014 /etc/cron.daily/logrotate

This issue is commonly asked about. The logrotate man page provides this guidance.

Log files are rotated every hour. Note that usually logrotate is configured to be run by cron daily. You have to change this configuration and run logrotate hourly to be able to really rotate logs hourly.

In my opinion, this cookbook should create /etc/cron.hourly/logrotate if the hourly option is used for any definitions of logrotate_app.

👍

It would be an excellent addition to this cookbook if the system ensured there was a /etc/cron. file that matches the shorted time used by the cookbook resources.

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

Closing due to inactivity. If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.