Site updated at 2017-10-27 06:07:00 UTC
This commit is contained in:
parent
33e5381d30
commit
8cf2c82e8f
28 changed files with 72 additions and 68 deletions
|
@ -75,7 +75,7 @@
|
|||
</h1>
|
||||
</header>
|
||||
<hr class="divider">
|
||||
<p>Newer linux distributions are trending towards using <code class="highlighter-rouge">systemd</code> for managing daemons. Typically, systems based on Fedora, ArchLinux, or Debian (8 or later) use <code class="highlighter-rouge">systemd</code>. This includes Ubuntu releases including and after 15.04, CentOS, and Red Hat. If you are unsure if your system is using <code class="highlighter-rouge">systemd</code>, you may check with the following command:</p>
|
||||
<p>Newer Linux distributions are trending towards using <code class="highlighter-rouge">systemd</code> for managing daemons. Typically, systems based on Fedora, ArchLinux, or Debian (8 or later) use <code class="highlighter-rouge">systemd</code>. This includes Ubuntu releases including and after 15.04, CentOS, and Red Hat. If you are unsure if your system is using <code class="highlighter-rouge">systemd</code>, you may check with the following command:</p>
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>ps -p 1 -o <span class="nv">comm</span><span class="o">=</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<p>A service file is needed to control Home Assistant with <code class="highlighter-rouge">systemd</code>. The template below should be created using a text editor. Note, root permissions via <code class="highlighter-rouge">sudo</code> will likely be needed. The following should be noted to modify the template:</p>
|
||||
<ul>
|
||||
<li><code class="highlighter-rouge">ExecStart</code> contains the path to <code class="highlighter-rouge">hass</code> and this may vary. Check with <code class="highlighter-rouge">whereis hass</code> for the location.</li>
|
||||
<li>For most systems, the file is <code class="highlighter-rouge">/etc/systemd/system/home-assistant@[your user].service</code> with [your user] replaced by the user account that Home Assistant will run as - normally <code class="highlighter-rouge">homeassistant</code>. In particular, this is the case for Ubuntu 16.04.</li>
|
||||
<li>For most systems, the file is <code class="highlighter-rouge">/etc/systemd/system/home-assistant@[your user].service</code> with [your user] replaced by the user account that Home Assistant will run as (normally <code class="highlighter-rouge">homeassistant</code>). In particular, this is the case for Ubuntu 16.04.</li>
|
||||
<li>If unfamiliar with command-line text editors, <code class="highlighter-rouge">sudo nano -w [filename]</code> can be used with <code class="highlighter-rouge">[filename]</code> replaced with the full path to the file. Ex. <code class="highlighter-rouge">sudo nano -w /etc/systemd/system/home-assistant@[your user].service</code>. After text entered, press CTRL-X then press Y to save and exit.</li>
|
||||
<li>If you’re running Home Assistant in a Python virtual environment or a Docker container, please skip to the appropriate template listed below.</li>
|
||||
</ul>
|
||||
|
@ -170,6 +170,10 @@ WantedBy=multi-user.target
|
|||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo journalctl -f -u home-assistant@[your user] | grep -i <span class="s1">'error'</span>
|
||||
</code></pre>
|
||||
</div>
|
||||
<p>When working on Home Assitant, you can easily restart the system and then watch the log output by combining the above commands using <code class="highlighter-rouge">&&</code></p>
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo systemctl restart home-assistant@[your user] <span class="o">&&</span> sudo journalctl -f -u home-assistant@[your user]
|
||||
</code></pre>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
<aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole">
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
</code></pre>
|
||||
</div>
|
||||
<h3><a class="title-link" name="step-2-create-a-directory-for-home-assistant" href="#step-2-create-a-directory-for-home-assistant"></a> Step 2: Create a directory for Home Assistant</h3>
|
||||
<p>This can be anywhere you want. As example we put it in <code class="highlighter-rouge">/srv</code>. You also need to change the ownership of the directory to the user you created above (if you created one).</p>
|
||||
<p>This can be anywhere you want. We chose to put it in <code class="highlighter-rouge">/srv</code>. You also need to change the ownership of the directory to the user you created above (if you created one).</p>
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo mkdir /srv/homeassistant
|
||||
<span class="gp">$ </span>sudo chown homeassistant:homeassistant /srv/homeassistant
|
||||
</code></pre>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue