formula-prometheus-ng/prometheus/files/exporter.systemd.jinja

26 lines
519 B
Plaintext
Raw Normal View History

[Unit]
Description=Prometheus {{ svc }} Exporter
{%- if url is string %}
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 %}
{%- for arg in args %}} \
{{ arg }}
{%- endfor %}
{%- endif %}
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=always
RestartSec=42s
[Install]
WantedBy=multi-user.target