summaryrefslogtreecommitdiff
path: root/data/templates/high-availability/10-override.conf.j2
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-09-14 15:48:11 +0100
committerGitHub <noreply@github.com>2023-09-14 15:48:11 +0100
commitd43770709b0f398dda9e846abade594e892dbe5a (patch)
treeac4a540e4b42a0d2347e1c7789316df988e2fa4b /data/templates/high-availability/10-override.conf.j2
parentc803cf3bae093b4661c7e6213fce41461d1c62c2 (diff)
parent7a79dd77fa11fac4030e66057dde2d51f063b934 (diff)
downloadvyos-1x-d43770709b0f398dda9e846abade594e892dbe5a.tar.gz
vyos-1x-d43770709b0f398dda9e846abade594e892dbe5a.zip
Merge pull request #2212 from sever-sever/T5480-sag
T5480: Ability to disable SNMP for keepalived service VRRP
Diffstat (limited to 'data/templates/high-availability/10-override.conf.j2')
-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