summaryrefslogtreecommitdiff
path: root/data/templates/https
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-12-26 00:10:07 +0100
committerChristian Poessinger <christian@poessinger.com>2021-12-26 00:10:07 +0100
commit4aaf0ba69139d84f89e5c3feee6edd845af8d1e5 (patch)
tree6c5c2168edee8aacbdb8a5875a1703c161b8d0a6 /data/templates/https
parentd767d8774613d7e9b2bd860b2604c7770eff2402 (diff)
downloadvyos-1x-4aaf0ba69139d84f89e5c3feee6edd845af8d1e5.tar.gz
vyos-1x-4aaf0ba69139d84f89e5c3feee6edd845af8d1e5.zip
http: api: T4055: add VRF support
Diffstat (limited to 'data/templates/https')
-rw-r--r--data/templates/https/vyos-http-api.service.tmpl22
1 files changed, 22 insertions, 0 deletions
diff --git a/data/templates/https/vyos-http-api.service.tmpl b/data/templates/https/vyos-http-api.service.tmpl
new file mode 100644
index 000000000..15bd80d65
--- /dev/null
+++ b/data/templates/https/vyos-http-api.service.tmpl
@@ -0,0 +1,22 @@
+{% set vrf_command = 'ip vrf exec ' + vrf + ' ' if vrf is defined else '' %}
+[Unit]
+Description=VyOS HTTP API service
+After=vyos-router.service
+Requires=vyos-router.service
+
+[Service]
+ExecStart={{vrf_command}}/usr/libexec/vyos/services/vyos-http-api-server
+Type=idle
+
+SyslogIdentifier=vyos-http-api
+SyslogFacility=daemon
+
+Restart=on-failure
+
+# Does't work but leave it here
+User=root
+Group=vyattacfg
+
+[Install]
+WantedBy=vyos.target
+