Skip to content
Mark Grant edited this page Nov 8, 2018 · 8 revisions

DNSMASQ Log Rotation Project


Contents

1 ... Project Description

2 ... AutoTools (configure and make) Installation

3 ... Ubuntu Installation

4 ... Debian and Raspbian Installation


1 ... Project Description

This AutoTools project utilises the logrotate facillity to provide log rotation for dnsmasq.

It places a logrotate control file in sysconfdir/logrotate.d and a post-rotate script file in sbindir.


2 ... AutoTools (configure and make) Installation

a) ... Download either the source or distribution tarball (the .tar.gz file) from:-

b) ... Extract the tarball preserving the directory structure.

c) ... cd to the directory created.

d) ... If you downloaded the source tarball type 'autoreconf -if'

e) ... Type './configure'

f) ... As root or sudo, type 'make install clean'

g) ... Edit the first line of sysconfdir/logrotate.d/dnsmasq to reflect the location of your dnsmasq log file, ('log-facility=' line in sysconfdir/dnsmasq.conf).

(Quote marks are for textual clarity only).

To uninstall the package:

1 ... cd to the directory created in the above install process.

2 ... As root or sudo, type 'make uninstall clean'


3 ... Ubuntu Installation

This script is available as an Ubuntu package hosted in a Personal Package Archive (PPA). If you add this PPA to your software sources then you can easily install, update and remove the package.

To view the details of this PPA please follow the link below:-

To add this PPA to your system please type the following:-

  • sudo apt-get install software-properties-common
  • sudo add-apt-repository ppa:m-grant-prg/utils
  • sudo apt-get update

To install this script on your system for use please type the following:-

  • sudo apt-get update
  • sudo apt-get install dnsmasq-logrotate

To uninstall this package at any time please type:-

  • sudo apt-get remove dnsmasq-logrotate

4 ... Debian and Raspbian Installation

Debian and Raspbian packages can be installed from a repository hosted at Bintray:-

To add this repository to your system please type the following:-

To install this script on your system for use please type the following:-

  • sudo apt-get update
  • sudo apt-get install dnsmasq-logrotate

To uninstall this package at any time please type:-

  • sudo apt-get remove dnsmasq-logrotate
Clone this wiki locally