From 57c205ce329d7ed8f10b803891e2857c6f4a34f2 Mon Sep 17 00:00:00 2001 From: Jonathan Keljo Date: Mon, 25 Mar 2019 20:01:16 -0700 Subject: [PATCH] Update to bashio and ignore failure to stop. Fixes #7 --- ozwcp/build.json | 8 ++++---- ozwcp/ozwcp.sh | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ozwcp/build.json b/ozwcp/build.json index a59b785..1479cc3 100644 --- a/ozwcp/build.json +++ b/ozwcp/build.json @@ -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", diff --git a/ozwcp/ozwcp.sh b/ozwcp/ozwcp.sh index 57eea63..0652646 100755 --- a/ozwcp/ozwcp.sh +++ b/ozwcp/ozwcp.sh @@ -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. @@ -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