Site updated at 2017-01-15 17:48:29 UTC
This commit is contained in:
parent
3a2befc8da
commit
a9e8c57522
536 changed files with 12700 additions and 1884 deletions
|
@ -133,6 +133,25 @@ WantedBy=multi-user.target
|
|||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>If you want to use docker, the following template should work for you.</p>
|
||||
|
||||
<div class="highlighter-rouge"><pre class="highlight"><code>[Unit]
|
||||
Description=Home Assistant
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
ExecStart=/usr/bin/docker run --name="home-assistant-%i" -v /home/%i/.homeassistant/:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant
|
||||
ExecStop=/usr/bin/docker stop -t 2 home-assistant-%i
|
||||
ExecStopPost=/usr/bin/docker rm -f home-assistant-%i
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<p>You need to reload <code class="highlighter-rouge">systemd</code> to make the daemon aware of the new configuration. Enable and launch Home Assistant after that.</p>
|
||||
|
||||
<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>sudo systemctl --system daemon-reload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue