Commit 50cd8e36 authored by ale's avatar ale

Allow passing multiple paths on the command line

parent 09c607b7
Pipeline #945 passed with stages
in 39 seconds
......@@ -106,6 +106,21 @@ from ``@default``, but it will also contain the ``_spf`` TXT record
from the ``@base`` template.
Special zone attributes
-----------------------
Besides `EXTENDS` described above, there are a few other special
attributes that can be set on a zone. They are recognizable from
normal records because they are specified in uppercase:
* `TTL` sets the TTL for the zone
* `REFRESH` sets the SOA refresh time
* `RETRY` sets the SOA retry time
* `EXPIRE` sets the SOA expire time
* `NEG_CACHE` sets the SOA negative caching time
By default, generated zones will have a TTL of 1 hour.
Variable substitution and configuration
---------------------------------------
......
......@@ -7,7 +7,7 @@ from zonetool import zone
def main():
parser = optparse.OptionParser(
usage='%prog [<OPTIONS>] <PATH>')
usage='%prog [<OPTIONS>] <PATH>...')
parser.add_option(
'-c', '--config', dest='config', metavar='FILE',
help='Load global configuration from FILE (in YAML format)')
......@@ -41,8 +41,8 @@ def main():
help='Refresh all DNSSEC signatures')
opts, args = parser.parse_args()
if len(args) != 1:
parser.error('Wrong number of arguments')
if not args:
parser.error('Not enough arguments')
# Create a global config dictionary using the environment and (if
# specified) a YAML config file. The advantage of the config file
......@@ -55,7 +55,8 @@ def main():
# Parse the DNS configuration and generate zone data.
zp = zone.ZoneParser(config)
zp.load(zone.readyaml(zone.walk(args[0])))
for arg in args:
zp.load(zone.readyaml(zone.walk(arg)))
pproc = None
if opts.key_dir and opts.ds_dir and opts.nsec3_salt:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment