Hi!

> >I found the solution to my problem (was suggested in this ml yesterday).
[SNIP]
> >expected. But removing the post-rotate-part will fix the problem of sogo
> >being offline after a log-rotate occurred.
> >Just posting it here for documentary reasons.
> 
> Yes, i can remove it  but i want understand something about this restart.
> Really neeed that? what is it?
The sogo process holds an open file handle on the log file (say sogo.log).
Logrotate moves sogo.log to sogo.log.1. The file handle does not change --
sogo still writes to sogo.log which now became sogo.log.1 -- which is the
wrong file.
The restart was there to make sogo reopen the file handle -- to ultimately
write to the new sogo.log file.
In case you use the "copytrunkate" option of logrotate this restart is not
required any more, because log messages are copied away into sogo.log.1 and
the log file sogo.log is truncated. See "man logrotate" for details.

-- Adi
-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Reply via email to