summaryrefslogtreecommitdiff
path: root/src/conf-mode/vyos-config-mdns-repeater.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf-mode/vyos-config-mdns-repeater.py')
-rwxr-xr-xsrc/conf-mode/vyos-config-mdns-repeater.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/conf-mode/vyos-config-mdns-repeater.py b/src/conf-mode/vyos-config-mdns-repeater.py
index 85e3bb42c..04a17c126 100755
--- a/src/conf-mode/vyos-config-mdns-repeater.py
+++ b/src/conf-mode/vyos-config-mdns-repeater.py
@@ -20,7 +20,6 @@ import sys
import os
import netifaces
import time
-import subprocess
from vyos.config import Config
from vyos.util import ConfigError
@@ -76,16 +75,12 @@ def generate(mdns):
return None
def apply(mdns):
- systemd_cmd = ["sudo", "systemctl"]
-
if len(mdns) == 0:
- systemd_cmd.append("stop")
+ cmd = "sudo systemctl stop mdns-repeater"
else:
- systemd_cmd.append("restart")
-
- systemd_cmd.append("mdns-repeater.service")
+ cmd = "sudo systemctl restart mdns-repeater"
- subprocess.call(systemd_cmd)
+ os.system(cmd)
return None
if __name__ == '__main__':