mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 21:36:52 +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
d93be4bfff
commit
a343f4740a
@ -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