23 lines
457 B
Django/Jinja
23 lines
457 B
Django/Jinja
[Unit]
|
|
Description=Prometheus {{ svc }} Exporter
|
|
{%- if url %}
|
|
Documentation={{ url }}
|
|
{%- endif %}
|
|
Wants=basic.target
|
|
After=basic.target network.target
|
|
|
|
[Service]
|
|
User={{ user }}
|
|
Group={{ group }}
|
|
EnvironmentFile=/etc/default/{{ svc }}
|
|
ExecStart={{ bin_path }}/{{ svc }} $ARGS
|
|
{%- if args is string %} {{ args }}{% else %}
|
|
{%- for arg in args %} \
|
|
{{ arg }}
|
|
{%- endfor %}
|
|
{%- endif %}
|
|
Restart=always
|
|
RestartSec=42s
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|