[Dnsmasq-discuss] DNSMASQ Log Rotation Project

Mark Grant m.grant.prg at gmail.com
Sat Nov 10 10:07:57 GMT 2018


My first post to this list.

In a brief email exchange with Simon he suggested that it might be
worth posting some information about this project to this list.

It is a small simple project to provide automated log rotation for
dnsmasq logs. As Simon pointed out this is entirely unnecessary if the
dnsmasq defaults are used and logging is directed to syslog. If
alternative log files are specified with log-facility then it may be
useful.

The source is an AutoTools project hosted at GitHub which installs a
logrotate file in sysconfdir/logrotate.d and a post-rotate bash script
file in sbindir. The post-rotate script sends dnsmasq SIGUSR1 and
SIGUSR2 to dump stats and request the log file to be closed and
re-opened. The GitHub repo can be found at:-

https://github.com/m-grant-prg/dnsmasq-logrotate

Having been a Ubuntu user and now being a Debian user I have created
Debian packaging. The packaging is straight forward but does include a
postinst maintainer script which tries to find the alternative log file
path from dnsmasq.conf. If the information is not found the logrotate
file is removed. The packaging can be found on Launchpad at:-

https://launchpad.net/dnsmasq-logrotate

It is also set up to make built packages available in my PPA.

I also use this packaging to build packages for Debian offline and these
are uploaded to be hosted in my Debian repo at Bintray.

Further information can be found on the fledgling project wiki at:-

https://github.com/m-grant-prg/dnsmasq-logrotate/wiki

This location also details installation instructions if using
AutoTools or for retrieving packages from Launchpad and Bintray.

Thanks,
Mark Grant



More information about the Dnsmasq-discuss mailing list