summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2020-06-11 08:14:53 +0200
committerJernej Jakob <jernej.jakob@gmail.com>2020-06-11 22:10:47 +0200
commit96595b42259e0e386e15f657857934fa20a55ca6 (patch)
tree4efeb38c6df39f34f40c7debf1a9390bc8a6057c
parentfaa70f9fca2249f061a8890734cc4622f06395a3 (diff)
downloadvyos-1x-96595b42259e0e386e15f657857934fa20a55ca6.tar.gz
vyos-1x-96595b42259e0e386e15f657857934fa20a55ca6.zip
dns forwarding: T2486: add paths to files
-rwxr-xr-xsrc/conf_mode/dns_forwarding.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py
index efe169370..26a651c3d 100755
--- a/src/conf_mode/dns_forwarding.py
+++ b/src/conf_mode/dns_forwarding.py
@@ -34,7 +34,11 @@ parser = argparse.ArgumentParser()
parser.add_argument("--dhclient", action="store_true",
help="Started from dhclient-script")
-config_file = r'/run/powerdns/recursor.conf'
+pdns_rec_run_dir = '/run/powerdns'
+pdns_rec_lua_conf_file = f'{pdns_rec_run_dir}/recursor.conf.lua'
+pdns_rec_hostsd_lua_conf_file = f'{pdns_rec_run_dir}/recursor.vyos-hostsd.conf.lua'
+pdns_rec_hostsd_zones_file = f'{pdns_rec_run_dir}/recursor.forward-zones.conf'
+pdns_rec_config_file = f'{pdns_rec_run_dir}/recursor.conf'
default_config_data = {
'allow_from': [],
@@ -162,8 +166,8 @@ def apply(dns):
if dns is None:
# DNS forwarding is removed in the commit
call("systemctl stop pdns-recursor.service")
- if os.path.isfile(config_file):
- os.unlink(config_file)
+ if os.path.isfile(pdns_rec_config_file):
+ os.unlink(pdns_rec_config_file)
else:
call("systemctl restart pdns-recursor.service")