[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