Skip to content

Commit

Permalink
Update to bashio and ignore failure to stop. Fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeljo committed Mar 26, 2019
1 parent 922b36f commit 57c205c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions ozwcp/build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"build_from": {
"aarch64": "hassioaddons/base-aarch64:1.3.3",
"amd64": "hassioaddons/base-amd64:1.3.3",
"armhf": "hassioaddons/base-armhf:1.3.3",
"i386": "hassioaddons/base-i386:1.3.3"
"aarch64": "hassioaddons/base-aarch64:3.0.1",
"amd64": "hassioaddons/base-amd64:3.0.1",
"armhf": "hassioaddons/base-armhf:3.0.1",
"i386": "hassioaddons/base-i386:3.0.1"
},
"args": {
"OPENZWAVE_VERSION": "30567960bffa355b03bc19cf8d3050fa9796db92",
Expand Down
9 changes: 4 additions & 5 deletions ozwcp/ozwcp.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash -e
source /usr/lib/hassio-addons/base.sh
#!/usr/bin/env bashio

# Link options.xml from /config/ (used by OZW within Home Assistant) to
# the OZW used by OZWCP, so that they both will use the same options.
Expand All @@ -22,9 +21,9 @@ xmlstarlet ed -L -N x="http://code.google.com/p/open-zwave/"\
# working directory must be the ozwcp repo), so we link it.
ln -fs /config/OZW_Log.txt /root/open-zwave-control-panel/OZW_Log.txt

hass.log.info "Stopping hass.io to avoid network, config, and log conflicts..."
hass.api.homeassistant.stop
bashio::log.info "Attempting to stop hass.io to avoid network, config, and log conflicts..."
bashio::homeassistant.stop || bashio::log.warning 'Failed top stop hass.io; continuing anyway'

hass.log.info "Starting ozwcp..."
bashio::log.info "Starting ozwcp..."
/root/open-zwave-control-panel/ozwcp

0 comments on commit 57c205c

Please sign in to comment.