[Dnsmasq-discuss] Logfile rotation
Simon Kelley
simon at thekelleys.org.uk
Mon Jan 25 12:35:26 GMT 2010
richardvoigt at gmail.com wrote:
> On Sun, Jan 24, 2010 at 11:33 PM, Don Muller <don at djmuller.com> wrote:
>> logrotate does not exist on the NAS. I can write a script to perform it on dnsmasq if someone would tell me what happens when dnsmasq receives SIGUSR2.
>
> I strongly suspect that it closes its current file (by filehandle) and
> opens again the same name. Therefore you should relink (move/rename)
> the existing logfile beforehand so that the open attempt finds no
> existing file and creates a new one.
That's correct, but you may also have to create the new one and change
its ownership/permissions so that dnsmasq can write to it. Remember that
whilst running dnsmasq will probably not be uid=0
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list