Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

bionutrient
Copy link

sudo su is needed on raspberry pi to create the systemd service file

if the file is initially created using the wrong directory for hass, then the file, at least when I did it, needed to be removed, and systemctl reloaded prior to fixing the service file.

sudo su is needed on raspberry pi to create the systemd service file

if the file is initially created using the wrong directory for hass, then the file, at least when I did it, needed to be removed, and systemctl reloaded prior to fixing the service file.
@@ -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
Copy link
Member

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.

Copy link
Author

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.

Copy link
Member

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.

Copy link
Contributor

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

@Landrash
Copy link
Contributor

@bionutrient Any more work on this?

@Landrash
Copy link
Contributor

Closing this since it's gone stale. Feel free to reopen it when the comments have been fixed.

@Landrash Landrash closed this Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants