20 lines
916 B
Text
20 lines
916 B
Text
|
[Unit]
|
||
|
Description=Fastd Prometheus Exporter
|
||
|
Documentation=https://github.com/freifunk-darmstadt/fastd-exporter
|
||
|
Wants=network-online.target
|
||
|
After=network-online.target
|
||
|
|
||
|
[Service]
|
||
|
Type=simple
|
||
|
|
||
|
{% if fastd_exporter_opts is defined %}
|
||
|
ExecStart={{ fastd_exporter_path }} {{ fastd_exporter_default_opts }} {{ fastd_exporter_opts }} --instances="{% for mesh in meshes %}{% for instance in mesh.fastd.nodes.instances %}{{ mesh.id }}vpn-{{ instance.mtu }}{% if not loop.last %},{% endif %}{% endfor %}{% if not loop.last %},{% endif %}{% endfor %}"
|
||
|
{% else %}
|
||
|
ExecStart={{ fastd_exporter_path }} {{ fastd_exporter_default_opts }} --instances="{% for mesh in meshes %}{% for instance in mesh.fastd.nodes.instances %}{{ mesh.id }}vpn-{{ instance.mtu }}{% if not loop.last %},{% endif %}{% endfor %}{% if not loop.last %},{% endif %}{% endfor %}"
|
||
|
{% endif %}
|
||
|
Restart=always
|
||
|
RestartSec=5s
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|