xoxys.homeassistant_docker/templates/etc/systemd/system/homeassistant.service.j2

20 lines
440 B
Plaintext
Raw Normal View History

2019-04-27 11:52:50 +00:00
#jinja2: lstrip_blocks: True
2019-08-28 08:45:44 +00:00
{{ ansible_managed | comment }}
2019-04-27 11:52:50 +00:00
[Unit]
Description=Home Assistant
2019-04-27 16:21:42 +00:00
Wants=network-online.target
2019-10-13 21:15:36 +00:00
{% for item in homeassistant_systemd_after %}
After={{ item }}
{% endfor %}
2019-04-27 11:52:50 +00:00
[Service]
Type=simple
2019-04-27 16:21:42 +00:00
User={{ homeassistant_user }}
Group={{ homeassistant_group }}
2019-04-27 12:29:00 +00:00
ExecStart={{ homeassistant_base_dir }}/venv/bin/hass -c {{ homeassistant_conf_dir }}
2019-04-27 11:52:50 +00:00
Restart=on-failure
RestartSec=5s
[Install]
2019-04-27 16:21:42 +00:00
WantedBy=multi-user.target