Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for an 'alwaysaction' or 'forceactions' option #424

Open
realsimix opened this issue Oct 11, 2021 · 2 comments
Open

Proposal for an 'alwaysaction' or 'forceactions' option #424

realsimix opened this issue Oct 11, 2021 · 2 comments
Labels

Comments

@realsimix
Copy link

Hi,

It would be nice to have an alwaysaction or forceactions option which can be used to force running of an action no matter if a log was rotated or not.

In my case I need it for complex postprocessing of logs in addition to the processing done by logrotate. From my searches on the internet I gather that I'm not the only one looking for such a feature.

alwaysaction could work like lastaction but being called always.

or

forceactions could make all actions to be run always.

Would be nice to have this in new versions although it wont help for existing systems.

Regards,
Simon

@kdudka
Copy link
Member

kdudka commented Oct 11, 2021

What would be the advantage over running such a script by cron or systemd timer directly?

@realsimix
Copy link
Author

It makes sure the script is always run when logrotate has been running, independent from how and when logrotate is running.

I'm packaging software and it's better to run the postprocessing script from within logrotate. That way I can be sure the script is always run at the correct time in the correct order, no matter which init system is used on the target system or what cron implementation is used.

That's a huge advantage over all the hacky solutions by adding it to systemd, init scripts, cron entries or systemd timers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants