aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReuben D'Netto <rdnetto@gmail.com>2018-04-11 19:10:57 +1000
committerPaul Healy <lmiphay@gmail.com>2018-04-14 16:57:35 +0100
commit85dcffda2f4f4997103b1a0326f6c9e986e0f525 (patch)
tree3543c7ec572f5f6fb51f4de50b7377eefeaabc6b /app-misc/homeassistant-bin/files
parentrevbump slack (diff)
downloadlmiphay-85dcffda2f4f4997103b1a0326f6c9e986e0f525.tar.gz
lmiphay-85dcffda2f4f4997103b1a0326f6c9e986e0f525.tar.bz2
lmiphay-85dcffda2f4f4997103b1a0326f6c9e986e0f525.zip
app-misc/homeassistant: Added systemd service
Diffstat (limited to 'app-misc/homeassistant-bin/files')
-rw-r--r--app-misc/homeassistant-bin/files/homeassistant.conf.d2
-rwxr-xr-xapp-misc/homeassistant-bin/files/homeassistant.init.d1
-rw-r--r--app-misc/homeassistant-bin/files/homeassistant.service13
3 files changed, 14 insertions, 2 deletions
diff --git a/app-misc/homeassistant-bin/files/homeassistant.conf.d b/app-misc/homeassistant-bin/files/homeassistant.conf.d
index 401cb10..5e12440 100644
--- a/app-misc/homeassistant-bin/files/homeassistant.conf.d
+++ b/app-misc/homeassistant-bin/files/homeassistant.conf.d
@@ -6,4 +6,4 @@
# Switches to pass to hass. See 'hass --help' for
# a description of the possible switches.
#
-HASS_OPTS=""
+HASS_OPTS="-c /etc/homeassistant"
diff --git a/app-misc/homeassistant-bin/files/homeassistant.init.d b/app-misc/homeassistant-bin/files/homeassistant.init.d
index 1afeae5..262f173 100755
--- a/app-misc/homeassistant-bin/files/homeassistant.init.d
+++ b/app-misc/homeassistant-bin/files/homeassistant.init.d
@@ -14,7 +14,6 @@ start_stop_daemon_args="--user $user --stdout $stdoutlog --stderr $serverlog --r
command="/opt/homeassistant/bin/hass"
command_args="
- --config /etc/homeassistant
--log-file $warningslog
--log-rotate-days 9
${HASS_OPTS}
diff --git a/app-misc/homeassistant-bin/files/homeassistant.service b/app-misc/homeassistant-bin/files/homeassistant.service
new file mode 100644
index 0000000..e4f1f36
--- /dev/null
+++ b/app-misc/homeassistant-bin/files/homeassistant.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Home Assistant
+After=network-online.target
+
+[Service]
+Type=simple
+User=homeassistant
+ExecStart=/opt/homeassistant/bin/hass --log-file /var/log/homeassistant/homeassistant.log $HASS_OPTS
+EnvironmentFile=/etc/conf.d/homeassistant
+
+[Install]
+WantedBy=multi-user.target
+