From e74db7b3446514f813da9b28f5844c70ef086f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavol=20Babin=C4=8D=C3=A1k?= Date: Sat, 8 Dec 2018 18:46:30 +0100 Subject: [PATCH] Fedora improvements (#7774) * Remove group gpio from Installation instructions for Fedora That group doesn't exist on Fedora by default. I believe it makes more sense to add homeassistant to that group later when that group needs to be created. * sudo to homeassistant before virtualenv is activated on Fedora Very similar approach to Debian-based installation needs to be done here. In the previous block of commands user homeassistant is created and directories are chowned to him. If one would try to run followup pip3 install or even hass itself as current user he wouldn't be able to write to those directories or that homeassistant user would be just useless. --- source/_docs/installation/fedora.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/_docs/installation/fedora.markdown b/source/_docs/installation/fedora.markdown index 52f01886f6e..be37bdeecba 100644 --- a/source/_docs/installation/fedora.markdown +++ b/source/_docs/installation/fedora.markdown @@ -27,12 +27,13 @@ To isolate the Home Assistant installation a [venv](https://docs.python.org/3/li ```bash $ sudo mkdir -p /opt/homeassistant -$ sudo useradd -rm homeassistant -G dialout,gpio +$ sudo useradd -rm homeassistant -G dialout $ sudo chown -R homeassistant:homeassistant /opt/homeassistant ``` Now switch to the new directory, setup the venv, and activate it. ```bash +$ sudo -u homeassistant -H -s $ cd /opt/homeassistant $ python3.6 -m venv . $ source bin/activate