summaryrefslogtreecommitdiff
path: root/src/conf_mode/service_mdns-repeater.py
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2021-10-16 20:54:34 +0200
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2021-10-19 22:46:41 +0200
commit16ae2933ff976737e52113105228a5f7f75686a3 (patch)
treea815a5c83864a46a9f2bc3086a14b0fe743ba613 /src/conf_mode/service_mdns-repeater.py
parent56810c62f91d3f11e23b2836bb4d14db6ec8ce25 (diff)
downloadvyos-1x-16ae2933ff976737e52113105228a5f7f75686a3.tar.gz
vyos-1x-16ae2933ff976737e52113105228a5f7f75686a3.zip
mdns: T3917: Change to avahi-daemon for IPv4 + IPv6 mDNS repeater
Diffstat (limited to 'src/conf_mode/service_mdns-repeater.py')
-rwxr-xr-xsrc/conf_mode/service_mdns-repeater.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/conf_mode/service_mdns-repeater.py b/src/conf_mode/service_mdns-repeater.py
index c920920ed..55b568e48 100755
--- a/src/conf_mode/service_mdns-repeater.py
+++ b/src/conf_mode/service_mdns-repeater.py
@@ -28,7 +28,7 @@ from vyos import ConfigError
from vyos import airbag
airbag.enable()
-config_file = r'/etc/default/mdns-repeater'
+config_file = '/etc/avahi/avahi-daemon.conf'
vrrp_running_file = '/run/mdns_vrrp_active'
def get_config(config=None):
@@ -92,12 +92,12 @@ def generate(mdns):
if len(mdns['interface']) < 2:
return None
- render(config_file, 'mdns-repeater/mdns-repeater.tmpl', mdns)
+ render(config_file, 'mdns-repeater/avahi-daemon.tmpl', mdns)
return None
def apply(mdns):
if not mdns or 'disable' in mdns:
- call('systemctl stop mdns-repeater.service')
+ call('systemctl stop avahi-daemon.service')
if os.path.exists(config_file):
os.unlink(config_file)
@@ -112,10 +112,10 @@ def apply(mdns):
os.mknod(vrrp_running_file) # vrrp script looks for this file to update mdns repeater
if len(mdns['interface']) < 2:
- call('systemctl stop mdns-repeater.service')
+ call('systemctl stop avahi-daemon.service')
return None
- call('systemctl restart mdns-repeater.service')
+ call('systemctl restart avahi-daemon.service')
return None