summarylogtreecommitdiffstats
path: root/hass.service
blob: 94695b02a7f39f99b17a96d40593bb0772df14ee (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=CARGO_HOME=%C/hass/cargo
Environment=PYTHON_EGG_CACHE=%C/hass/python-eggs
Environment=VIRTUAL_ENV=%S/hass-installation
Environment=XDG_CACHE_HOME=%C/hass
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