Question: zmpkg.pl logrot

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
phils01
Posts: 12
Joined: Fri Mar 19, 2021 5:04 pm

Question: zmpkg.pl logrot

Post 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.
User avatar
iconnor
Posts: 3357
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Question: zmpkg.pl logrot

Post 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
Post Reply