I set logrotate with the below config, the scripts in question do nothing but stop and start the given program.
When it runs automatically, however, something isn't working--I get up in the morning and the program is running but not doing anything as if its log file were touched while running. The scripts do use full paths at all points, nothing is shortened. If not, how can I make it do so? Is that even the problem?
Logrotate: Force Log Rotation
In case it's helpful, these are the two scripts. The program takes a few seconds to cleanly shut down, that's why it sleeps. Home Questions Tags Users Unanswered.
Logrotate - How to Rotate and Compress logs
Asked 4 years ago. Viewed 6k times. When it runs under cron, it has a very minimal environment, and likely, a very short path. As a first step, go through everything and specify full paths for every executable even standard OS commands.
EightBitTony Just verified, only full paths are used. I've added that to the question as well as the scripts themselves. Does it work from cron if you use full paths to those programs?
One Reply to “Logrotate: Force Log Rotation”
The rotate ran correctly, though I don't know if run-parts properly simulates cron. I'll have to wait overnight to verify that it works properly. Sign up or log in Sign up using Google. Sign up using Facebook.
Sign up using Email and Password. Post as a guest Name.
Email Required, but never shown. How to create micro-interactions with react-spring: Part 1. This week, StackOverflowKnows syntactic sugar, overfit or nah, and the…. Featured on Meta.
Thank you, Shog9. Thank you, Robert Cartaino. What is the Linux tag for?
Force Log Rotation
Related 2. Hot Network Questions. Question feed.