i'd like to do logfile rotation for whenever i start a service, but never "automatically".
i'm running a python-based service that logs to a specific logfile.
the service (currently) does not support notification to re-open it's logfiles (e.g.
also, the service must not be restarted for logfile rotation (it's producing a continous audio-stream, which should not be interrupted).
the system i'm running on does not have a hardware clock, so the clock gets reset everytime the system boots, which makes log entries originating from different reboots in the same file tedious (i get the same date multiple times).
i also want to keep history across various boots.
so the idea is to use logrotation on each boot (only).
something like running
/usr/sbin/logrotate --force /etc/logrotate.d/myservice before starting the service should do the trick.
now my question is, is it possible to configure log-rotationg in
/etc/logrotate.d/myservice in such a way, that it will be never run automatically?
an easy solution would be to not store my logrotate-config file in
/etc/logrotate.d/, but "somewhere else".
but then, i'd like to have my user be able to find the logrotate-config in a well-known place (so they can modify the config at their will).