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:
Alex 2017-01-17 08:02:12 +01:00 committed by Fabian Affolter
parent d93be4bfff
commit a343f4740a
No known key found for this signature in database
GPG Key ID: E23CD2DD36A4397F

View File

@ -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]