summaryrefslogtreecommitdiff
path: root/data/templates/rsyslog/override.conf.j2
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-05-08 22:34:22 +0200
committerChristian Breunig <christian@breunig.cc>2023-05-08 22:45:53 +0200
commit46d2bcdb0b500b4d1b9d973ab5b9ca3c6cf44e51 (patch)
treeed4136e5222db87aa3b0bf2879867b6a5e3508a0 /data/templates/rsyslog/override.conf.j2
parent1dc79cebc6d27a8f9d2f9ca9c2e0f2fd0809d940 (diff)
downloadvyos-1x-46d2bcdb0b500b4d1b9d973ab5b9ca3c6cf44e51.tar.gz
vyos-1x-46d2bcdb0b500b4d1b9d973ab5b9ca3c6cf44e51.zip
syslog: T2769: add VRF support
Allow syslog messages to be sent through a VRF (e.g. management).
Diffstat (limited to 'data/templates/rsyslog/override.conf.j2')
-rw-r--r--data/templates/rsyslog/override.conf.j211
1 files changed, 11 insertions, 0 deletions
diff --git a/data/templates/rsyslog/override.conf.j2 b/data/templates/rsyslog/override.conf.j2
new file mode 100644
index 000000000..5f6a87edf
--- /dev/null
+++ b/data/templates/rsyslog/override.conf.j2
@@ -0,0 +1,11 @@
+{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' ' if vrf is vyos_defined else '' %}
+[Unit]
+StartLimitIntervalSec=0
+
+[Service]
+ExecStart=
+ExecStart={{ vrf_command }}/usr/sbin/rsyslogd -n -iNONE
+Restart=always
+RestartPreventExitStatus=
+RestartSec=10
+RuntimeDirectoryPreserve=yes