I have a inotifywait on syslog. It works without issue until the log rolls over.
Although the same filename is used, the new file is a new file and inotify loses its reference.
How do we compensate for this to maintain the watch through the log rollover?
function setupto init the watch and monitor the file events I'm interested in. On theMOVE_SELFevent I make a recursive call to thesetupfunction. 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?iwatchas part of the log rollover.man logrotate logrotate.conf.postrotateproperty. Thanks.