diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2022-02-08 11:37:06 +0000 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2022-02-08 12:10:27 +0000 |
commit | e426c2d3bc182d790f83039b77a09d55230ca71f (patch) | |
tree | f79f154bb67260fcc4045a1c52b091fc5c66c4b8 /man | |
parent | 6279d9eaf3537be156bb722fbb700cdb673eeb38 (diff) | |
download | dnsmasq-e426c2d3bc182d790f83039b77a09d55230ca71f.tar.gz |
Add --conf-scriptv2.87test8
Diffstat (limited to 'man')
-rw-r--r-- | man/dnsmasq.8 | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/man/dnsmasq.8 b/man/dnsmasq.8 index 6ce61dd..ca155f0 100644 --- a/man/dnsmasq.8 +++ b/man/dnsmasq.8 @@ -2141,6 +2141,23 @@ A special case of which differs in two respects. Firstly, only \fB--server\fP and \fB--rev-server\fP are allowed in the configuration file included. Secondly, the file is re-read and the configuration therein is updated when dnsmasq receives SIGHUP. +.TP +.B \--conf-script=<file>[ <arg] +Execute <file>, and treat what it emits to stdout as the contents of a configuration file. +If the script exits with a non-zero exit code, dnsmasq treats this as a fatal error. +The script can be passed arguments, space seperated from the filename and each other so, for instance +.B --conf-dir="/etc/dnsmasq-uncompress-ads /share/ads-domains.gz" + +with /etc/dnsmasq-uncompress-ads containing + +set -e + +zcat ${1} | sed -e "s:^:address=/:" -e "s:$:/:" + +exit 0 + +and /share/ads-domains.gz containing a compressed +list of ad server domains will save disk space with large ad-server blocklists. .SH CONFIG FILE At startup, dnsmasq reads .I /etc/dnsmasq.conf, @@ -2537,7 +2554,9 @@ file/directory, permissions). 5 - Other miscellaneous problem. .PP 11 or greater - a non zero return code was received from the -lease-script process "init" call. The exit code from dnsmasq is the +lease-script process "init" call or a +.B \--conf-script +file. The exit code from dnsmasq is the script's exit code with 10 added. .SH LIMITS |