Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Have you tried monitoring the containing directory to detect and respond to the creation of the new file after roll-over? Commented Aug 2, 2020 at 1:13
  • @AndyDalton That'a good suggestion but instead I have a function setup to init the watch and monitor the file events I'm interested in. On the MOVE_SELF event I make a recursive call to the setup function. That might be a spectacularly bad solution but I'm just a hobbyist so no real damage. A regular restart of the service should ward off disaster but I'm interested in what will happen. How does bash handle recursion? Commented Aug 2, 2020 at 1:44
  • 1
    You could restart your iwatch as part of the log rollover. man logrotate logrotate.conf. Commented Aug 2, 2020 at 3:24
  • @waltinator Oh yeah! With the postrotate property. Thanks. Commented Aug 2, 2020 at 3:36