summaryrefslogtreecommitdiff
path: root/data/templates/syslog/override.conf.tmpl
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-05-08 22:34:22 +0200
committerChristian Breunig <christian@breunig.cc>2023-05-11 20:43:58 +0200
commitbdc9e293a9acb6265b7c0f75a965da801e797574 (patch)
tree8558263dede522d542d65eceddd088d9b1fd87ae /data/templates/syslog/override.conf.tmpl
parent7ccd7b4ab990c5501069af7af5d6929abf5b4f11 (diff)
downloadvyos-1x-bdc9e293a9acb6265b7c0f75a965da801e797574.tar.gz
vyos-1x-bdc9e293a9acb6265b7c0f75a965da801e797574.zip
syslog: T2769: add VRF support
Allow syslog messages to be sent through a VRF (e.g. management). (cherry picked from commit 46d2bcdb0b500b4d1b9d973ab5b9ca3c6cf44e51)
Diffstat (limited to 'data/templates/syslog/override.conf.tmpl')
-rw-r--r--data/templates/syslog/override.conf.tmpl11
1 files changed, 11 insertions, 0 deletions
diff --git a/data/templates/syslog/override.conf.tmpl b/data/templates/syslog/override.conf.tmpl
new file mode 100644
index 000000000..60c397fa7
--- /dev/null
+++ b/data/templates/syslog/override.conf.tmpl
@@ -0,0 +1,11 @@
+{% set vrf_command = 'ip vrf exec ' + vrf + ' ' if vrf is defined else '' %}
+[Unit]
+StartLimitIntervalSec=0
+
+[Service]
+ExecStart=
+ExecStart={{ vrf_command }}/usr/sbin/rsyslogd -n -iNONE
+Restart=always
+RestartPreventExitStatus=
+RestartSec=10
+RuntimeDirectoryPreserve=yes