correct signaling for logrotate/postrotate of hostapd logs?

Jouni Malinen j at
Sat Aug 3 06:22:29 PDT 2019

On Tue, Jul 09, 2019 at 08:42:24AM -0700, PGNet Dev wrote:
> I build/run hostapd on linux.
> I use logrotate.d to manage logfiles.
> For hostapd, using
> 	/var/log/hostapd/hostapd.log {

How do you make that file? With the -f<file> command line argument to

> correctly rolls the log, creating a archive, but there's no more writing to
> the existing/active log.  Until I manually *restart* hostapd ...
> What's the correct non-connection-terminating postrotate clause
> 	...
> 	postrotate
> 		???
> 	endscript
> that properly signals hostapd to continue writing to its main log?

If you are using -f on the command line, sending RELOG command over the
control interface (e.g., with "hostapd_cli RELOG") requests hostapd to
close and reopen the log file.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list