Skip to content

Commit 34d80da

Browse files
committed
Rename directory to be in sync with other guides
1 parent 204a8d5 commit 34d80da

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

source/getting-started/installation-virtualenv.markdown

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,50 +27,50 @@ $ sudo pip install --upgrade virtualenv
2727
This step is optional, but it's a good idea to give services like Home Assistant their own user. It gives you more granular control over permissions, and reduces the exposure to the rest of your system in the event there is a security related bug in Home Assistant. This is a reasonably Linux oriented step, and will look different on other operating systems (or even other Linux distributions).
2828

2929
```bash
30-
$ sudo adduser --system hass
30+
$ sudo adduser --system homeassistant
3131
```
3232

33-
Home Assistant stores its configuration in `$HOME/.homeassistant` by default, so in this case, it would be in `/home/hass/.homeassistant`
33+
Home Assistant stores its configuration in `$HOME/.homeassistant` by default, so in this case, it would be in `/home/homeassistant/.homeassistant`
3434

3535
If you plan to use a Z-Wave controller, you will need to add this user to the `dialout` group
3636

3737
```bash
38-
$ sudo usermod -G dialout -a hass
38+
$ sudo usermod -G dialout -a homeassistant
3939
```
4040

4141
### {% linkable_title Step 2: Create a directory for Home Assistant %}
4242

43-
This can be anywhere you want. AS example we put it in `/srv`. You also need to change the ownership of the directory to the user you created above (if you created one).
43+
This can be anywhere you want. As example we put it in `/srv`. You also need to change the ownership of the directory to the user you created above (if you created one).
4444

4545
```bash
46-
$ sudo mkdir /srv/hass
47-
$ sudo chown hass /srv/hass
46+
$ sudo mkdir /srv/homeassistant
47+
$ sudo chown hass /srv/homeassistant
4848
```
4949

5050
### {% linkable_title Step 3: Become the new user %}
5151

52-
This is obviously only necessary if you created a `hass` user, but if you did, be sure to switch to that user whenever you install things in your virtualenv, otherwise you'll end up with mucked up permissions.
52+
This is obviously only necessary if you created a `homeassistant` user, but if you did, be sure to switch to that user whenever you install things in your virtualenv, otherwise you'll end up with mucked up permissions.
5353

5454
```bash
55-
$ sudo su -s /bin/bash hass
55+
$ sudo su -s /bin/bash homeassistant
5656
```
5757

58-
The `su` command means 'switch' user. We use the '-s' flag because the `hass` user is a system user and doesn't have a default shell by default (to prevent attackers from being able to log in as that user).
58+
The `su` command means 'switch' user. We use the '-s' flag because the `homeassistant` user is a system user and doesn't have a default shell by default (to prevent attackers from being able to log in as that user).
5959

6060
### {% linkable_title Step 4: Set up the virtualenv %}
6161

62-
All this step does is stick a Python environment in the directory we're using. That's it. It's just a directory. There's nothing 'special' about it, and it is entirely self-contained.
62+
All this step does is stick a Python environment in the directory we're using. That's it. It's just a directory. There's nothing special about it, and it is entirely self-contained.
6363

6464
It will include a `bin` directory, which will contain all the executables used in the virtualenv (including hass itself). It also includes a script called `activate` which we will use to activate the virtualenv.
6565

6666
```bash
67-
$ virtualenv -p python3 /srv/hass
67+
$ virtualenv -p python3 /srv/homeassistant
6868
```
6969

7070
### {% linkable_title Step 5: Activate the virtualenv %}
7171

7272
```bash
73-
$ source /srv/hass/bin/activate
73+
$ source /srv/homeassistant/bin/activate
7474
```
7575

7676
After that, your prompt should include `(hass)`.
@@ -83,17 +83,17 @@ Once your virtualenv has been activated, you don't need to `sudo` any of your `p
8383
(hass)$ pip3 install --upgrade homeassistant
8484
```
8585

86-
And that's it... you now have Home Assistant installed, and you can be sure that every bit of it is contained in `/srv/hass`.
86+
And that's it... you now have Home Assistant installed, and you can be sure that every bit of it is contained in `/srv/homeassistant`.
8787

8888
### {% linkable_title Finally... Run Home Assistant %}
8989

9090
There are two ways to launch Home Assistant. If you are **in** the virtualenv, you can just run `hass` and it will work as normal. If the virtualenv is not activated, you just use the `hass` executable in the `bin` directory mentioned earlier. There is one caveat... Because Home Assistant stores its configuration in the user's home directory, we need to be the user `hass` user or specify the configuration with `-c`.
9191

9292
```bash
93-
$ sudo -u hass -H /srv/hass/bin/hass
93+
$ sudo -u homeassistant -H /srv/homeassistant/bin/hass
9494
```
9595

96-
The `-H` flag is important. It sets the `$HOME` environment variable to `/home/hass` so `hass` can find its configuration.
96+
The `-H` flag is important. It sets the `$HOME` environment variable to `/home/homeassistant` so `hass` can find its configuration.
9797

9898
### {% linkable_title Upgrading Home Assistant %}
9999

@@ -122,8 +122,8 @@ Then, activate your virtualenv (steps 3 and 5 above) and upgrade cython.
122122
Finally, get and install `python-openzwave`.
123123

124124
```bash
125-
(hass)$ mkdir /srv/hass/src
126-
(hass)$ cd /srv/hass/src
125+
(hass)$ mkdir /srv/homeassistant/src
126+
(hass)$ cd /srv/homeassistant/src
127127
(hass)$ git clone https://github.com/OpenZWave/python-openzwave.git
128128
(hass)$ cd python-openzwave
129129
(hass)$ git checkout python3

0 commit comments

Comments
 (0)