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

Feature Request: Set default statefile via configuration #581

Open
hjf288 opened this issue Jan 25, 2024 · 2 comments
Open

Feature Request: Set default statefile via configuration #581

hjf288 opened this issue Jan 25, 2024 · 2 comments

Comments

@hjf288
Copy link

hjf288 commented Jan 25, 2024

It would be helpful to be able to specify the default state file name/location via the configuration file rather than have it defined at compile time or passed via command line.

@cgzones
Copy link
Member

cgzones commented Mar 15, 2024

What is your use case?
Normally the default state file fits the default config files run by root, and if specified a separate config file one can also specify a separate state file.

@hjf288
Copy link
Author

hjf288 commented May 16, 2024

Sorry missed the notification for this.

I'm using log rotate in a ephemeral container and want to ensure that state is persisted by putting the file on shared storage.

I've modified the daily cron to define the location to the state file that I want, however when invoking logrotate via the CLI (arguably a rare situation) then I can't guarantee that someone is going to specify the location to the state file.

I can't use a symlink for /var/lib/logrotate/status as the symlink gets overwritten with a file - so I'd like to just be able to set the state file to the location it needs to be via configuration file.

You mention that a separate state file can be set via config - how is this done? I don't see reference to it in the man page, only passing it as a parameter to the log rotate command.

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

No branches or pull requests

2 participants