diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-13 22:54:12 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-04-13 22:55:46 +0200 |
commit | 8aa7607113316a425751a442d4c3d1256c7dc8aa (patch) | |
tree | 2797c2c8ac913e91c010f64c41a3d6191439ae70 /data/templates | |
parent | 19859c09dd33a1126dc4b0d5cd0dbe309ed78ac2 (diff) | |
download | vyos-1x-8aa7607113316a425751a442d4c3d1256c7dc8aa.tar.gz vyos-1x-8aa7607113316a425751a442d4c3d1256c7dc8aa.zip |
http: api: T4333: migrate to new vyos_defined Jinja2 test
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/https/override.conf.tmpl | 8 | ||||
-rw-r--r-- | data/templates/https/vyos-http-api.service.tmpl | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/data/templates/https/override.conf.tmpl b/data/templates/https/override.conf.tmpl index 824b1ba3b..c2c191b06 100644 --- a/data/templates/https/override.conf.tmpl +++ b/data/templates/https/override.conf.tmpl @@ -1,15 +1,15 @@ -{% set vrf_command = 'ip vrf exec ' + vrf + ' ' if vrf is defined else '' %} +{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' ' if vrf is vyos_defined else '' %} [Unit] StartLimitIntervalSec=0 After=vyos-router.service [Service] ExecStartPre= -ExecStartPre={{vrf_command}}/usr/sbin/nginx -t -q -g 'daemon on; master_process on;' +ExecStartPre={{ vrf_command }}/usr/sbin/nginx -t -q -g 'daemon on; master_process on;' ExecStart= -ExecStart={{vrf_command}}/usr/sbin/nginx -g 'daemon on; master_process on;' +ExecStart={{ vrf_command }}/usr/sbin/nginx -g 'daemon on; master_process on;' ExecReload= -ExecReload={{vrf_command}}/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload +ExecReload={{ vrf_command }}/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload Restart=always RestartPreventExitStatus= RestartSec=10 diff --git a/data/templates/https/vyos-http-api.service.tmpl b/data/templates/https/vyos-http-api.service.tmpl index 15bd80d65..fb424e06c 100644 --- a/data/templates/https/vyos-http-api.service.tmpl +++ b/data/templates/https/vyos-http-api.service.tmpl @@ -1,11 +1,11 @@ -{% set vrf_command = 'ip vrf exec ' + vrf + ' ' if vrf is defined else '' %} +{% 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 +ExecStart={{ vrf_command }}/usr/libexec/vyos/services/vyos-http-api-server Type=idle SyslogIdentifier=vyos-http-api |