mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Remove unnecessary environment variable setup from systemd service (#2223)
* Remove unnecessary environment variable setup The environment variables are not needed and are actually overriding the system PATH variable and were causing trouble in certain circumstances. * Make the user for the service dynamic * Cleans up leftover comment * Refine text to reflect the changes in the service * Revert change of the users home path
This commit is contained in:
parent
889d8d6dfd
commit
3512b476b4
@ -39,7 +39,7 @@ ExecStart=/usr/bin/hass
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
If you've setup Home Assistant in `virtualenv` following our [python installation guide](https://home-assistant.io/getting-started/installation-virtualenv/) or [manual installation guide for raspberry pi](https://home-assistant.io/getting-started/installation-raspberry-pi/), the following template should work for you. If Home Assistant install is not located at `/srv/homeassistant`, please modify the `Enviroment=` and `ExecStart=` lines appropriately.
|
||||
If you've setup Home Assistant in `virtualenv` following our [python installation guide](https://home-assistant.io/getting-started/installation-virtualenv/) or [manual installation guide for raspberry pi](https://home-assistant.io/getting-started/installation-raspberry-pi/), the following template should work for you. If Home Assistant install is not located at `/srv/homeassistant`, please modify the `ExecStart=` line appropriately.
|
||||
|
||||
```
|
||||
[Unit]
|
||||
@ -48,10 +48,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=homeassistant
|
||||
# Make sure the virtualenv Python binary is used
|
||||
Environment=VIRTUAL_ENV="/srv/homeassistant"
|
||||
Environment=PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
User=%i
|
||||
ExecStart=/srv/homeassistant/bin/hass -c "/home/homeassistant/.homeassistant"
|
||||
|
||||
[Install]
|
||||
|
Loading…
x
Reference in New Issue
Block a user