summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2023-12-29 18:21:33 -0600
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-02-01 19:52:15 +0000
commit3e713e5c96081206c47a44cf044428bcfa27cd02 (patch)
tree1d62c4d767de73b791d57d873ec5da44be71b74d /src/services
parent8996552e61af617c9193895ad5588191615be16d (diff)
downloadvyos-1x-3e713e5c96081206c47a44cf044428bcfa27cd02.tar.gz
vyos-1x-3e713e5c96081206c47a44cf044428bcfa27cd02.zip
dns: T5959: Streamline dns forwarding service
Streamline configuration and operation of dns forwarding service in following ways: - Remove `dns_forwarding_reset.py` as its functionality is now covered by `dns.py` - Adjust function names in `dns.py` to disambiguate between DNS forwarding and dynamic DNS - Remove `dns_forwarding_restart.sh` as its functionality is inlined in `dns-forwarding.xml` - Templatize systemd override for `pdns-recursor.service` and move the generated override files in /run. This ensures that the override files are always generated afresh after boot - Simplify the systemd override file by removing the redundant overrides - Relocate configuration path for pdns-recursor to `/run/pdns-recursor` and utilize the `RuntimeDirectory` default that pdns-recursor expects - We do not need to use custom `--socket-dir` path anymore, the default path (viz., `/run/pdns-recursor` is fine) (cherry picked from commit 1c1fb5fb4bd7c0d205b28caf90357ad56423464f)
Diffstat (limited to 'src/services')
-rwxr-xr-xsrc/services/vyos-hostsd12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/services/vyos-hostsd b/src/services/vyos-hostsd
index e34a4b740..1ba90471e 100755
--- a/src/services/vyos-hostsd
+++ b/src/services/vyos-hostsd
@@ -271,8 +271,8 @@ SOCKET_PATH = "ipc://" + os.path.join(RUN_DIR, 'vyos-hostsd.sock')
RESOLV_CONF_FILE = '/etc/resolv.conf'
HOSTS_FILE = '/etc/hosts'
-PDNS_REC_USER = PDNS_REC_GROUP = 'pdns'
-PDNS_REC_RUN_DIR = '/run/powerdns'
+PDNS_REC_USER_GROUP = 'pdns'
+PDNS_REC_RUN_DIR = '/run/pdns-recursor'
PDNS_REC_LUA_CONF_FILE = f'{PDNS_REC_RUN_DIR}/recursor.vyos-hostsd.conf.lua'
PDNS_REC_ZONES_FILE = f'{PDNS_REC_RUN_DIR}/recursor.forward-zones.conf'
@@ -436,18 +436,18 @@ def make_hosts(state):
def make_pdns_rec_conf(state):
logger.info(f"Writing {PDNS_REC_LUA_CONF_FILE}")
- # on boot, /run/powerdns does not exist, so create it
- makedir(PDNS_REC_RUN_DIR, user=PDNS_REC_USER, group=PDNS_REC_GROUP)
+ # on boot, /run/pdns-recursor does not exist, so create it
+ makedir(PDNS_REC_RUN_DIR, user=PDNS_REC_USER_GROUP, group=PDNS_REC_USER_GROUP)
chmod_755(PDNS_REC_RUN_DIR)
render(PDNS_REC_LUA_CONF_FILE,
'dns-forwarding/recursor.vyos-hostsd.conf.lua.j2',
- state, user=PDNS_REC_USER, group=PDNS_REC_GROUP)
+ state, user=PDNS_REC_USER_GROUP, group=PDNS_REC_USER_GROUP)
logger.info(f"Writing {PDNS_REC_ZONES_FILE}")
render(PDNS_REC_ZONES_FILE,
'dns-forwarding/recursor.forward-zones.conf.j2',
- state, user=PDNS_REC_USER, group=PDNS_REC_GROUP)
+ state, user=PDNS_REC_USER_GROUP, group=PDNS_REC_USER_GROUP)
def set_host_name(state, data):
if data['host_name']: