Skip to content

Commit

Permalink
Update run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
T-REX-XP authored Apr 19, 2019
1 parent 1844b76 commit 8938db1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#!/bin/sh
set -e

CONFIG_PATH=./data/options.json
CONFIG_PATH=/data/options.json

HVAC_HOST=$(jq --raw-output ".hvac_host" $CONFIG_PATH)
MQTT_BROKER_URL=$(jq --raw-output ".mqtt.broker_url" $CONFIG_PATH)
MQTT_TOPIC_PREFIX=$(jq --raw-output ".mqtt.topic_prefix" $CONFIG_PATH)
MQTT_USERNAME=$(jq --raw-output ".mqtt.username" $CONFIG_PATH)
MQTT_PASSWORD=$(jq --raw-output ".mqtt.password" $CONFIG_PATH)

npm install
node index.js \
--hvac-host="${HVAC_HOST}" \
--mqtt-broker-url="${MQTT_BROKER_URL}" \
--mqtt-topic-prefix="${MQTT_TOPIC_PREFIX}"
--mqtt-topic-prefix="${MQTT_TOPIC_PREFIX}" \
--mqtt-username="${MQTT_USERNAME}" \
--mqtt-password="${MQTT_PASSWORD}"

0 comments on commit 8938db1

Please sign in to comment.