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

20 lines
440 B
Plaintext
Raw Normal View History

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