-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
added sudo and some error fix language #883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ If the preceding command returns the string `systemd`, you are likely using `sys | |
If you want Home Assistant to be launched automatically, an extra step is needed to setup `systemd`. You need a service file to control Home Assistant with `systemd`. If you are using a Raspberry Pi with Raspbian then replace the `[your user]` with `pi` otherwise use your user you want to run Home Assistant. `ExecStart` contains the path to `hass` and this may vary. Check with `whereis hass` for the location. | ||
|
||
```bash | ||
$ su -c 'cat <<EOF >> /etc/systemd/system/home-assistant@[your user].service | ||
$ sudo su -c 'cat <<EOF >> /etc/systemd/system/home-assistant@[your user].service | ||
[Unit] | ||
Description=Home Assistant | ||
After=network.target | ||
|
@@ -63,6 +63,13 @@ $ sudo systemctl status home-assistant@[your user] -l | |
[...] | ||
``` | ||
|
||
IF, you get an error message, and it fails to start Home Assistant, double check that your ExecStart=/usr/bin/hass points to the correct location...it's likely ExecStart=/usr/local/bin/hass If you didn't update it correctly, you may have to remove the home-assistant@pi.service file and then start over at the top of this instruction set using the correct directory. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please follow the same style here and embed stuff like
|
||
|
||
'''bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to use three `. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. got it |
||
$ sudo rm /etc/systemd/system/home-assistant@pi.service | ||
$ sudo systemctl --system daemon-reload | ||
''' | ||
|
||
To get Home Assistant's logging output, simple use `journalctl`. | ||
|
||
```bash | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sudo su
looks always a bit wired. This will only work if the user is listed in the/etc/sudoers
file which is no a lot of systems not the case. If this is Rapbian specific then we should mention that and keep the guide generic.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sudo is Raspbian specific (I think)... but it caused me much consternation... So I would propose we have something to indicate that you may need to run as sudo if using raspbian.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In another PR (#873) we were talking about a Troubleshooting page for Rasbian. I think that this should be added there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bionutrient
sudo
is defiantly not specific to Raspbian or Linux for that part. It's a command that let's you execute a command with escalated privileges.The
su
command when ran without specifying a user will default to the root user and is often called the superuser command(a bit misleading).In this case your escalating privileges to root to run another command as root.
I think(haven't tested) that you could replace the command in question with
$ sudo cat <<EOF >> /etc/systemd/system/home-assistant@[your user].service