From eca4b9e0ac47849aa21b425728392eba4d2def38 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Tue, 3 Jan 2017 18:38:32 +0000 Subject: [PATCH] Site updated at 2017-01-03 18:38:31 UTC --- atom.xml | 2 +- blog/categories/community/atom.xml | 2 +- blog/categories/device-tracking/atom.xml | 2 +- blog/categories/esp8266/atom.xml | 2 +- blog/categories/how-to/atom.xml | 2 +- blog/categories/ibeacons/atom.xml | 2 +- blog/categories/internet-of-things/atom.xml | 2 +- blog/categories/iot-data/atom.xml | 2 +- blog/categories/micropython/atom.xml | 2 +- blog/categories/mqtt/atom.xml | 2 +- blog/categories/organisation/atom.xml | 2 +- blog/categories/owntracks/atom.xml | 2 +- blog/categories/presence-detection/atom.xml | 2 +- .../public-service-announcement/atom.xml | 2 +- blog/categories/release-notes/atom.xml | 2 +- blog/categories/survey/atom.xml | 2 +- blog/categories/talks/atom.xml | 2 +- blog/categories/technology/atom.xml | 2 +- blog/categories/user-stories/atom.xml | 2 +- blog/categories/video/atom.xml | 2 +- blog/categories/website/atom.xml | 2 +- getting-started/autostart-upstart/index.html | 108 +++++++++++++++++- sitemap.xml | 30 ++--- 23 files changed, 143 insertions(+), 37 deletions(-) diff --git a/atom.xml b/atom.xml index 130c1c50e4..93c99df890 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index e2c0c8b5fb..2617dcf2f5 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 41b76a0206..5dbc8f1cb4 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index 49229cdeb7..539c7879f7 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index 5d916bc81f..5f676078cd 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index 84adfd51bd..9bcdb0025d 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index d17ff0e5d4..2fc45ff941 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index 7485c0a569..46a4edb61e 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml index ab2849b5a5..d22cd0f753 100644 --- a/blog/categories/micropython/atom.xml +++ b/blog/categories/micropython/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Micropython | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 9362f3285f..24269e8714 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index f345a5f476..bc0ed82f4b 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index 3d678ac5ca..4d95369f05 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 4d5ffabd17..119de4d96d 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 4d99238c21..0de7a34114 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index 0d17bde3b5..64dd97b7dc 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 2650947136..569f477f3e 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index b684c4c649..9aebf51bae 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index f86660fd6b..5a2e3b5009 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index 76ab1722ad..e16f252eb6 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index d422417523..8cc63f8e45 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index bd53e51824..c53e18a1cf 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2017-01-01T20:14:34+00:00 + 2017-01-03T18:36:19+00:00 https://home-assistant.io/ diff --git a/getting-started/autostart-upstart/index.html b/getting-started/autostart-upstart/index.html index 75f0ff1619..b2a953fc8c 100644 --- a/getting-started/autostart-upstart/index.html +++ b/getting-started/autostart-upstart/index.html @@ -98,7 +98,113 @@

If the preceding command returns the string init, you are likely using Upstart.

-

Upstart will launch init scripts that are located in the directory /etc/init.d/. A sample init script for systems using Upstart is maintained by this project.

+

Upstart will launch init scripts that are located in the directory /etc/init.d/. A sample init script for systems using Upstart could look like the sample below.

+ +
#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          hass
+# Required-Start:    $local_fs $network $named $time $syslog
+# Required-Stop:     $local_fs $network $named $time $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Description:       Home\ Assistant
+### END INIT INFO
+
+# /etc/init.d Service Script for Home Assistant
+# Created with: https://gist.github.com/naholyr/4275302#file-new-service-sh
+#
+# Installation:
+#   1) If any commands need to run before executing hass (like loading a
+#      virutal environment), put them in PRE_EXEC. This command must end with
+#      a semicolon.
+#   2) Set RUN_AS to the username that should be used to execute hass.
+#   3) Copy this script to /etc/init.d/
+#       sudo cp hass-daemon /etc/init.d/hass-daemon
+#       sudo chmod +x /etc/init.d/hass-daemon
+#   4) Register the daemon with Linux
+#       sudo update-rc.d hass-daemon defaults
+#   5) Install this service
+#       sudo service hass-daemon install
+#   6) Restart Machine
+#
+# After installation, HA should start automatically. If HA does not start,
+# check the log file output for errors.
+#       /var/opt/homeassistant/home-assistant.log
+
+PRE_EXEC=""
+RUN_AS="USER"
+PID_FILE="/var/run/hass.pid"
+CONFIG_DIR="/var/opt/homeassistant"
+FLAGS="-v --config $CONFIG_DIR --pid-file $PID_FILE --daemon"
+REDIRECT="> $CONFIG_DIR/home-assistant.log 2>&1"
+
+start() {
+  if [ -f $PID_FILE ] && kill -0 $(cat $PID_FILE) 2> /dev/null; then
+    echo 'Service already running' >&2
+    return 1
+  fi
+  echo 'Starting service…' >&2
+  local CMD="$PRE_EXEC hass $FLAGS $REDIRECT;"
+  su -c "$CMD" $RUN_AS
+  echo 'Service started' >&2
+}
+
+stop() {
+    if [ ! -f "$PID_FILE" ] || ! kill -0 $(cat "$PID_FILE") 2> /dev/null; then
+    echo 'Service not running' >&2
+    return 1
+  fi
+  echo 'Stopping service…' >&2
+  kill -3 $(cat "$PID_FILE")
+  while ps -p $(cat "$PID_FILE") > /dev/null 2>&1; do sleep 1;done;
+  echo 'Service stopped' >&2
+}
+
+install() {
+    echo "Installing Home Assistant Daemon (hass-daemon)"
+    echo "999999" > $PID_FILE
+    chown $RUN_AS $PID_FILE
+    mkdir -p $CONFIG_DIR
+    chown $RUN_AS $CONFIG_DIR
+}
+
+uninstall() {
+  echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
+  local SURE
+  read SURE
+  if [ "$SURE" = "yes" ]; then
+    stop
+    rm -fv "$PID_FILE"
+    echo "Notice: The config directory has not been removed"
+    echo $CONFIG_DIR
+    update-rc.d -f hass-daemon remove
+    rm -fv "$0"
+    echo "Home Assistant Daemon has been removed. Home Assistant is still installed."
+  fi
+}
+
+case "$1" in
+  start)
+    start
+    ;;
+  stop)
+    stop
+    ;;
+  install)
+    install
+    ;;
+  uninstall)
+    uninstall
+    ;;
+  restart)
+    stop
+    start
+    ;;
+  *)
+    echo "Usage: $0 {start|stop|restart|install|uninstall}"
+esac
+
+

To install this script, download it, tweak it to you liking, and install it by following the directions in the header. This script will setup Home Assistant to run when the system boots. To start/stop Home Assistant manually, issue the following commands:

diff --git a/sitemap.xml b/sitemap.xml index 2a10e8219a..6a2bf01141 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -2502,62 +2502,62 @@ https://home-assistant.io/demo/frontend.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/demo/index.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-event.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-info.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-service.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-state.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/demo/panels/ha-panel-dev-template.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/demo/panels/ha-panel-history.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/demo/panels/ha-panel-iframe.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/demo/panels/ha-panel-logbook.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/demo/panels/ha-panel-map.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/googlef4f3693c209fe788.html -2017-01-01T20:13:53+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html -2017-01-01T20:13:54+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html -2017-01-01T20:13:54+00:00 +2017-01-03T18:35:31+00:00 https://home-assistant.io/static/mdi-demo.html -2017-01-01T20:13:54+00:00 +2017-01-03T18:35:31+00:00