blob: c3892e42b93f3c3d815cbc2efbf26c627e0d359c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' runuser -u frr -- ' if vrf is vyos_defined else '' %}
[Unit]
Description=FRR Exporter
Documentation=https://github.com/tynany/frr_exporter
After=network.target
[Service]
{% if vrf is not vyos_defined %}
User=frr
{% endif %}
ExecStart={{ vrf_command }}/usr/sbin/frr_exporter \
{% if listen_address is vyos_defined %}
{% for address in listen_address %}
--web.listen-address={{ address }}:{{ port }}
{% endfor %}
{% else %}
--web.listen-address=:{{ port }}
{% endif %}
[Install]
WantedBy=multi-user.target
|