2019-05-08 16:09:25 -04:00
|
|
|
[Unit]
|
2019-05-08 23:34:36 -04:00
|
|
|
{%- if description %}
|
|
|
|
Description=Prometheus {{ description }}
|
|
|
|
{%- else %}
|
2019-05-08 16:09:25 -04:00
|
|
|
Description=Prometheus {{ svc }} Exporter
|
2019-05-08 23:34:36 -04:00
|
|
|
{%- endif %}
|
2019-05-08 20:34:24 -04:00
|
|
|
{%- if url %}
|
2019-05-08 16:09:25 -04:00
|
|
|
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
|
2019-05-08 18:40:45 -04:00
|
|
|
{%- if args is string %} {{ args }}{% else %}
|
2019-05-08 18:43:22 -04:00
|
|
|
{%- for arg in args %} \
|
2019-05-08 16:09:25 -04:00
|
|
|
{{ arg }}
|
|
|
|
{%- endfor %}
|
|
|
|
{%- endif %}
|
|
|
|
Restart=always
|
|
|
|
RestartSec=42s
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|