dyn-ns-client: add option to remove potentially existing A/AAAA records
authorRalf Jung <post@ralfj.de>
Fri, 7 Apr 2017 09:31:45 +0000 (11:31 +0200)
committerRalf Jung <post@ralfj.de>
Fri, 7 Apr 2017 09:31:45 +0000 (11:31 +0200)
client-scripts/dyn-ns-client
dyn-ns-client.conf.dist

index 0e96bedb792e34cb79c35164eb240ebb7a94949a..f482c194f6fe17ed5a621f04f956f79785b41364 100755 (executable)
@@ -61,6 +61,8 @@ def getMyIP(family, config, methods = {}, verbose = 0):
     method = config[family]['method']
     if method == 'none':
         return None
+    elif method == 'remove':
+        return ""
     elif method == 'web':
         server = config[family].get('server', config['DEFAULT']['server'])
         url = 'https://'+server+'/checkip'
index 5b35ae354d007cae81c5e58c9c30346e92f07ba7..a833f439969ab8307b27b5b70de6203f50f6a32f 100644 (file)
@@ -8,6 +8,7 @@ password = some_secure_password
 [IPv4]
 # Possible IPv4 detection methods are
 # none: Don't set IPv4 address (leaves the domain's A record untouched).
+# remove: Remove domain's A record if it exists.
 # web: Call a website to detect the current, external IPv4 address.
 method = web
 
@@ -19,6 +20,7 @@ server = ipv4.ns.example.com
 [IPv6]
 # Possible IPv6 detection methods are
 # none: Don't set IPv6 address (leaves the domain's AAAA record untouched).
+# remove: Remove domain's AAAA record if it exists.
 # web: Call a website to detect the current, external IPv6 address.
 # local: Try to detect the global IPv6 address based on the configuration of the local network interfaces.
 method = none