Added support for selecting a DNS zone nsupdate should use.
authorManuel Worschech <worschech@gmail.com>
Sat, 16 Aug 2014 20:17:04 +0000 (22:17 +0200)
committerManuel Worschech <worschech@gmail.com>
Sat, 16 Aug 2014 20:17:04 +0000 (22:17 +0200)
ddns.conf.sample
src/ddns/providers.py

index de9516c..2a9642f 100644 (file)
@@ -25,6 +25,7 @@
 #
 # (optional)
 # server = 1.2.3.4
+# zone = somezone.bind.nsupdate
 # key = name
 # secret = XYZ
 # ttl = 60
index 43fc6bf..0fc6ec0 100644 (file)
@@ -320,6 +320,11 @@ class DDNSProviderBindNsupdate(DDNSProvider):
                if server:
                        scriptlet.append("server %s" % server)
 
+               # Set the DNS zone the host should be added to.
+               zone = self.get("zone", None)
+               if zone:
+                       scriptlet.append("zone %s" % zone)
+
                key = self.get("key", None)
                if key:
                        secret = self.get("secret")