From 44a9d73a410803f7b8506b1112e3e375b12b7661 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 27 Apr 2019 18:21:42 +0200 Subject: [PATCH] fix systemd file --- templates/etc/systemd/system/homeassistant.service.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/etc/systemd/system/homeassistant.service.j2 b/templates/etc/systemd/system/homeassistant.service.j2 index d851dcb..df8edab 100644 --- a/templates/etc/systemd/system/homeassistant.service.j2 +++ b/templates/etc/systemd/system/homeassistant.service.j2 @@ -2,14 +2,16 @@ # {{ ansible_managed }} [Unit] Description=Home Assistant +Wants=network-online.target After=network-online.target [Service] Type=simple -User=homeassistant +User={{ homeassistant_user }} +Group={{ homeassistant_group }} ExecStart={{ homeassistant_base_dir }}/venv/bin/hass -c {{ homeassistant_conf_dir }} Restart=on-failure RestartSec=5s [Install] -WantedBy=multi-user.targe +WantedBy=multi-user.target