4e60b17741
* add env pillar under component:name:service * update systemd template
23 lines
552 B
Django/Jinja
23 lines
552 B
Django/Jinja
#########################################################
|
|
# File managed by Salt. Changes risk being overwritten.
|
|
#########################################################
|
|
[Unit]
|
|
Description={{ desc }}
|
|
Wants=network-online.target
|
|
After=
|
|
Documentation=https://github.com/saltstack-formulas/prometheus-formula
|
|
|
|
[Service]
|
|
{% for var in env %}
|
|
Environment={{ var }}
|
|
{% endfor %}
|
|
User={{ user }}
|
|
Group={{ group }}
|
|
WorkingDirectory={{ workdir }}
|
|
ExecStart={{ start }}
|
|
ExecStop={{ stop }}
|
|
PIDFile=/var/run/{{ name }}.pid
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|