Handle it better

This commit is contained in:
Pascal Vizeli
2017-05-13 10:30:13 +02:00
parent 923057c751
commit 784e019f58
2 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "Check HomeAssistant config", "name": "Check HomeAssistant config",
"version": "0.1", "version": "0.2",
"slug": "check_config", "slug": "check_config",
"description": "Check HomeAssistant config with a new version", "description": "Check HomeAssistant config with a new version",
"url": "https://home-assistant.io/addons/check_config/", "url": "https://home-assistant.io/addons/check_config/",

View File

@@ -22,4 +22,11 @@ fi
echo "[INFO] Install done, check config now" echo "[INFO] Install done, check config now"
exec hass -c /config --script check_config cp -r /config /tmp/config > /dev/null
if ! HASS_OUTPUT="$(hass -c /tmp/config --script check_config)"
then
echo "[ERROR] Wrong config found: $HASS_OUTPUT"
exit 1
fi
echo "[INFO] Okay :)"