summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-05-12 17:49:37 +0200
committerChristian Poessinger <christian@poessinger.com>2022-05-12 17:50:19 +0200
commitd40549360a4e914c59e12d62d45ac99e8a1ecde6 (patch)
treea6a256e3219fe25e7820782776cb38c30c23bc22
parent8d120b9af4966d1d8cd49e4900b3de6149700b4e (diff)
downloadvyos-1x-d40549360a4e914c59e12d62d45ac99e8a1ecde6.tar.gz
vyos-1x-d40549360a4e914c59e12d62d45ac99e8a1ecde6.zip
conntrack: T3535: use "reload-or-restart" from systemd
-rwxr-xr-xsrc/conf_mode/conntrack_sync.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/conntrack_sync.py b/src/conf_mode/conntrack_sync.py
index 311e01529..c4b2bb488 100755
--- a/src/conf_mode/conntrack_sync.py
+++ b/src/conf_mode/conntrack_sync.py
@@ -116,6 +116,7 @@ def generate(conntrack):
return None
def apply(conntrack):
+ systemd_service = 'conntrackd.service'
if not conntrack:
# Failover mechanism daemon should be indicated that it no longer needs
# to execute conntrackd actions on transition. This is only required
@@ -123,7 +124,7 @@ def apply(conntrack):
if process_named_running('conntrackd'):
resync_vrrp()
- call('systemctl stop conntrackd.service')
+ call(f'systemctl stop {systemd_service}')
return None
# Failover mechanism daemon should be indicated that it needs to execute
@@ -132,7 +133,7 @@ def apply(conntrack):
if not process_named_running('conntrackd'):
resync_vrrp()
- call('systemctl restart conntrackd.service')
+ call(f'systemctl reload-or-restart {systemd_service}')
return None
if __name__ == '__main__':