mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 04:46:49 +00:00
Update systemd unit file for virtualenv (#1785)
The current systemd unit file will provoke an error because the 'ExecPre' line calls a shell built-in function and all systemd Execs need to use an absolute path. the proposed change sets the python environment using the provided 'Environment' calls as used by systemd.
This commit is contained in:
parent
7cd5ee3112
commit
c1aeb7ed55
@ -45,7 +45,9 @@ After=network.target
|
||||
[Service]
|
||||
Type=simple
|
||||
User=homeassistant
|
||||
ExecStartPre=source /srv/homeassistant/homeassistant_venv/bin/activate
|
||||
#make sure the virtualenv python binary is used
|
||||
Environment=VIRTUAL_ENV="/srv/homeassistant/homeassistant_venv"
|
||||
Environment=PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
ExecStart=/srv/homeassistant/homeassistant_venv/bin/hass -c "/home/homeassistant/.homeassistant"
|
||||
|
||||
[Install]
|
||||
|
Loading…
x
Reference in New Issue
Block a user