summarylogtreecommitdiffstats
path: root/hass.service
blob: a6e941c64d54175a9bf428d8e691caec57cf004b (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
34
35
36
37
38
39
40
[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 hass-installation
CacheDirectory=hass
Environment=XDG_CACHE_HOME=%C/hass
Environment=CARGO_HOME=${XDG_CACHE_HOME}/cargo
Environment=PYTHON_EGG_CACHE=${XDG_CACHE_HOME}/python-eggs
Environment=VIRTUAL_ENV=%S/hass-installation
WorkingDirectory=~

EnvironmentFile=-/etc/hass.env

ExecStart=%S/hass-installation/bin/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
ProtectSystem=full


[Install]
WantedBy=multi-user.target