Compare commits

..

No commits in common. "master" and "v0.1" have entirely different histories.
master ... v0.1

5 changed files with 1 additions and 47 deletions

View File

@ -1,13 +1,7 @@
# pdns-genrev
Tool to generate PTR records in reverse zones based off A/AAAA records in forward zones. Tool to generate PTR records in reverse zones based off A/AAAA records in forward zones.
## Configuration
Requires the following environment variables to be set: Requires the following environment variables to be set:
`GENREV_KEY` - the API key defined in the PowerDNS configuration `GENREV_KEY` - the API key defined in the PowerDNS configuration
`GENREV_URL` - URL to the PowerDNS webserver, without a path (for example `http://[::1]:8081`) `GENREV_URL` - URL to the PowerDNS webserver, without a path (for example `http://[::1]:8081`)
`GENREV_ZONES` - comma separated list of forward zones to scan `GENREV_ZONES` - comma separated list of forward zones to scan

View File

@ -45,9 +45,7 @@ def _get(path):
def _iterate_zone(zone, types, only_records=False): def _iterate_zone(zone, types, only_records=False):
result = {} result = {}
records = [] records = []
this_zone = _get(f'zones/{zone}')
escapedzone = requests.utils.quote(zone, safe='')
this_zone = _get(f'zones/{escapedzone}')
for rrset in this_zone['rrsets']: for rrset in this_zone['rrsets']:
if rrset['type'] in types: if rrset['type'] in types:

View File

@ -1,11 +1,7 @@
# This file is part of the pdns-genrev package
# Author: Georg Pfuetzenreuter <mail+opensuse@georg-pfuetzenreuter.net>
[Unit] [Unit]
Description=PowerDNS reverse zone update Description=PowerDNS reverse zone update
[Service] [Service]
Type=oneshot Type=oneshot
User=pdns-genrev
EnvironmentFile=/etc/sysconfig/pdns-genrev EnvironmentFile=/etc/sysconfig/pdns-genrev
ExecStart=/usr/bin/pdns-genrev $ARGS ExecStart=/usr/bin/pdns-genrev $ARGS

View File

@ -1,33 +0,0 @@
# This file is part of the pdns-genrev package
# Author: Georg Pfuetzenreuter <mail+opensuse@georg-pfuetzenreuter.net>
## Description: pdns-genrev configuration
## Type: string
## Default: not set
#
# PowerDNS API Key
#
GENREV_KEY=""
## Type: string
## Default: "http://[::1]:8081"
#
# PowerDNS web server
#
GENREV_URL="http://[::1]:8081"
## Type: string
## Default: not set
#
# Comma separated list of forward DNS zones
#
GENREV_ZONES=""
## Type: string
## Default: "--wet"
#
# Command line arguments to pass
# Add "--notify" here if primary/secondary replication is used
#
ARGS="--wet"

View File

@ -1 +0,0 @@
u pdns-genrev - "PowerDNS reverse zone helper" /var/lib/empty -