diff options
Diffstat (limited to 'hass.service')
-rw-r--r-- | hass.service | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/hass.service b/hass.service new file mode 100644 index 000000000000..9430597e1c29 --- /dev/null +++ b/hass.service @@ -0,0 +1,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 |