Change to how CronJobs for Log Rotations are managed.

I'd like to see an Optional choice for log rotations to be considered. When a new Virtual Server is created, rather than create a cron job on log rotations that'll do a apache restart why not have it append the commands to run to a single file and have the log rotation run that on a weekly basis?

And vice-versa when you remove said servers, it will remove the entry.

I have 3 at the moment doing 3 restarts during a week. As a result I have trouble debugging Apache issues unless I shut down all log rotations.

So if someone sets up 50 virtual servers, then that'll be 50 restarts on a weekly basis.

That could get horrible.

Status: 
Active

Comments

This is really a limitation of logrotate .. it doesn't have any good way to separate the post-rotate command from the log files.

That said, in a standard Virtualmin install the post-rotation command should be just apachectl graceful , which merely signals Apache to re-reads its config files and re-open logs. It shouldn't do a full restart.