diff options
author | Daniil Baturin <daniil@vyos.io> | 2020-03-23 04:19:44 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 04:19:44 +0700 |
commit | 0ae1e074e6a6f6cf6133b6f00127739ad39b2a4d (patch) | |
tree | adf5293108fb36a981fbe30bb7387be0a61f4448 /python | |
parent | e93c92f9e6b2ee29e671a4c1d2750500cc5f63b7 (diff) | |
parent | 79ef46e8af11c6fc57f9465b1b9ac97e775f2c89 (diff) | |
download | vyos-1x-0ae1e074e6a6f6cf6133b6f00127739ad39b2a4d.tar.gz vyos-1x-0ae1e074e6a6f6cf6133b6f00127739ad39b2a4d.zip |
Merge pull request #255 from DmitriyEshenko/crux-vrrp
vrrp: T1884: Add mode-force for run transition-scripts without checkiā¦
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/keepalived.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/python/vyos/keepalived.py b/python/vyos/keepalived.py index 4114aa736..6d1dbe12c 100644 --- a/python/vyos/keepalived.py +++ b/python/vyos/keepalived.py @@ -38,6 +38,15 @@ def vrrp_running(): def keepalived_running(): return vyos.util.process_running(pid_file) +# Clear VRRP data after showing +def remove_vrrp_data(data_file): + if data_file == "json" and os.path.exists(json_file): + os.remove(json_file) + elif data_file == "stats" and os.path.exists(stats_file): + os.remove(stats_file) + elif data_file == "state" and os.path.exists(state_file): + os.remove(state_file) + def force_state_data_dump(): pid = vyos.util.read_file(pid_file) os.kill(int(pid), signal.SIGUSR1) |