summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-09-05 18:26:13 -0500
committerGitHub <noreply@github.com>2023-09-05 18:26:13 -0500
commit490249bc57d948a60cd94f868d3bf0342caf136a (patch)
tree2e7092e110b533bf4e38639f23d0c8b11c1057f7 /data
parent3fe5482a29042c92298d3e69d90c0c38404d2fcc (diff)
parent5f2926cf04e8a569bb25cd4121179d12b9e04c6c (diff)
downloadvyos-1x-490249bc57d948a60cd94f868d3bf0342caf136a.tar.gz
vyos-1x-490249bc57d948a60cd94f868d3bf0342caf136a.zip
Merge pull request #2204 from sever-sever/T5480
T5480: Ability to disable SNMP for keepalived service VRRP
Diffstat (limited to 'data')
-rw-r--r--data/templates/high-availability/10-override.conf.j216
1 files changed, 16 insertions, 0 deletions
diff --git a/data/templates/high-availability/10-override.conf.j2 b/data/templates/high-availability/10-override.conf.j2
new file mode 100644
index 000000000..d1cb25581
--- /dev/null
+++ b/data/templates/high-availability/10-override.conf.j2
@@ -0,0 +1,16 @@
+### Autogenerated by ${vyos_conf_scripts_dir}/high-availability.py ###
+{% set snmp = '' if vrrp.disable_snmp is vyos_defined else '--snmp' %}
+[Unit]
+After=vyos-router.service
+# Only start if there is our configuration file - remove Debian default
+# config file from the condition list
+ConditionFileNotEmpty=
+ConditionFileNotEmpty=/run/keepalived/keepalived.conf
+
+[Service]
+KillMode=process
+Type=simple
+# Read configuration variable file if it is present
+ExecStart=
+ExecStart=/usr/sbin/keepalived --use-file /run/keepalived/keepalived.conf --pid /run/keepalived/keepalived.pid --dont-fork {{ snmp }}
+PIDFile=/run/keepalived/keepalived.pid