summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/protocols_igmp-proxy.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/conf_mode/protocols_igmp-proxy.py b/src/conf_mode/protocols_igmp-proxy.py
index c2d2fea5b..67ff8a3f0 100755
--- a/src/conf_mode/protocols_igmp-proxy.py
+++ b/src/conf_mode/protocols_igmp-proxy.py
@@ -87,18 +87,18 @@ def generate(igmp_proxy):
return None
render(config_file, 'igmp-proxy/igmpproxy.conf.j2', igmp_proxy)
-
return None
def apply(igmp_proxy):
+ service_name = 'igmpproxy.service'
if not igmp_proxy or 'disable' in igmp_proxy:
- # IGMP Proxy support is removed in the commit
- call('systemctl stop igmpproxy.service')
- if os.path.exists(config_file):
- os.unlink(config_file)
- else:
- call('systemctl restart igmpproxy.service')
+ # IGMP Proxy support is removed in the commit
+ call(f'systemctl stop {service_name}')
+ if os.path.exists(config_file):
+ os.unlink(config_file)
+ return None
+ call(f'systemctl restart {service_name}')
return None
if __name__ == '__main__':