summaryrefslogtreecommitdiff
path: root/data/templates/https/vyos-http-api.service.j2
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-05-01 20:46:44 +0200
committerChristian Poessinger <christian@poessinger.com>2022-05-01 20:47:07 +0200
commit5ec208ed9ee060f7c1a7707dc2369c83657196e8 (patch)
tree59419760dd18a2f65b621746910e9c2fa47d4edf /data/templates/https/vyos-http-api.service.j2
parentf38ce741c2852e4eaeeaa23736960d9a717b600f (diff)
downloadvyos-1x-5ec208ed9ee060f7c1a7707dc2369c83657196e8.tar.gz
vyos-1x-5ec208ed9ee060f7c1a7707dc2369c83657196e8.zip
http: api: T4353: fix Jinja2 linting errors
Diffstat (limited to 'data/templates/https/vyos-http-api.service.j2')
-rw-r--r--data/templates/https/vyos-http-api.service.j222
1 files changed, 22 insertions, 0 deletions
diff --git a/data/templates/https/vyos-http-api.service.j2 b/data/templates/https/vyos-http-api.service.j2
new file mode 100644
index 000000000..fb424e06c
--- /dev/null
+++ b/data/templates/https/vyos-http-api.service.j2
@@ -0,0 +1,22 @@
+{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' ' if vrf is vyos_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
+