Page 1 of 1

Question: zmpkg.pl logrot

Posted: Wed Dec 04, 2024 12:20 pm
by phils01
Hi

I am trying to change my log roatation so that Zonemidner is not restarted at midnight.

As far as I can tell the postrotate calls "zmpkg.pl logrot" which in turn calls "zmdc.pl logrot" and simply does some checks then restarts the zoneminder process from its pid.

If I change logrotate to use copytruncate, can I safely remove the postrotate command, or is it doing somethign else I have not noticed?

Thanks
Phil.

Re: Question: zmpkg.pl logrot

Posted: Wed Dec 04, 2024 1:51 pm
by iconnor
The logrot command send SIGHUP to all processes. Some will just restart, others don't restart, they close their log files and re-open them. This is so that they don't keep writing to the rotated log.

I don't know what the effect of copy + truncate would be