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
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue