summarylogtreecommitdiffstats
path: root/hass.service
blob: 9430597e1c290ae9d794c770e3b25d5c40a1dbd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[Unit]
Description=Home assistant
After=network.target
After=hass-update.service
Wants=hass-update.service

[Service]
Restart=on-failure
User=hass
Group=hass
LogsDirectory=hass
StateDirectory=hass
WorkingDirectory=~

EnvironmentFile=-/etc/hass.env

ExecStart=python -m homeassistant \
  --config "." \
  --log-file "${LOGS_DIRECTORY}/home-assistant.log" \
  --log-rotate-days 1
RestartForceExitStatus=100

LockPersonality=true
RestrictRealtime=true
RestrictSUIDSGID=true
ProtectControlGroups=true
ProtectKernelModules=true
ProtectKernelTunables=true
PrivateMounts=true


[Install]
WantedBy=multi-user.target