summaryrefslogtreecommitdiff
path: root/src/etc/systemd
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-01 20:40:16 +0200
committerChristian Breunig <christian@breunig.cc>2024-04-01 21:26:16 +0200
commite5af1f0905991103b12302892e6f0070bbb7b770 (patch)
tree6167a7c3aaa92f75f91788855fd10d294b04c89c /src/etc/systemd
parent5bb27f0c6220fd940b63cdd37a60c312c0ac3efd (diff)
downloadvyos-1x-e5af1f0905991103b12302892e6f0070bbb7b770.tar.gz
vyos-1x-e5af1f0905991103b12302892e6f0070bbb7b770.zip
ssh: T6192: allow binding to multiple VRF instances
Currently VyOS only supports binding a service to one individual VRF. It might become handy to have the services (initially it will be VRF, NTP and SNMP) be bound to multiple VRFs. Changed VRF from leafNode to multi leafNode with defaultValue: default - which is the name of the default VRF.
Diffstat (limited to 'src/etc/systemd')
-rw-r--r--src/etc/systemd/system/ssh@.service.d/vrf-override.conf13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/etc/systemd/system/ssh@.service.d/vrf-override.conf b/src/etc/systemd/system/ssh@.service.d/vrf-override.conf
new file mode 100644
index 000000000..b8952d86c
--- /dev/null
+++ b/src/etc/systemd/system/ssh@.service.d/vrf-override.conf
@@ -0,0 +1,13 @@
+[Unit]
+StartLimitIntervalSec=0
+After=vyos-router.service
+ConditionPathExists=/run/sshd/sshd_config
+
+[Service]
+EnvironmentFile=
+ExecStart=
+ExecStart=ip vrf exec %i /usr/sbin/sshd -f /run/sshd/sshd_config
+Restart=always
+RestartPreventExitStatus=
+RestartSec=10
+RuntimeDirectoryPreserve=yes