Quote:
Originally posted by kubla
However, I need this script to always run and after logrotate it loses its handle on syslog and while still running according to the process list, it doesn't respond any more.
|
The best way to fix this is to modify how you use tail. If you're using GNU's tail, it should support the cmdline option '--follow=name', this should prevent it from losing it's file handle/descriptor on the syslog file when the logs get rotated. Check your local manpage to be sure this option is followed.
As a side note, if you happen to be using a BSD-flavoured tail, '-F' appears to do the same thing.
--Misha