Skip to content

Commit

Permalink
Merge pull request #18 from b2un0/main
Browse files Browse the repository at this point in the history
fix rssi argument in docker container
  • Loading branch information
slespersen authored Jan 1, 2025
2 parents 991416e + 378e807 commit 451cd89
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ if [ -f "/data/options.json" ]; then
fi

MQTT_ENABLED=${MQTT_ENABLED:-"true"}
MQTT_ARGS=""
EXTRA_ARGS=""
SYS_MODULE_TO_RELOAD=${SYS_MODULE_TO_RELOAD:-""}

if [ "${MQTT_ENABLED}" = "true" ]; then
MQTT_ARGS="--mqtt --mqtt_broker ${MQTT_BROKER} --mqtt_port ${MQTT_PORT} --mqtt_user ${MQTT_USER} --mqtt_password ${MQTT_PASSWORD}"
EXTRA_ARGS="--mqtt --mqtt_broker ${MQTT_BROKER} --mqtt_port ${MQTT_PORT} --mqtt_user ${MQTT_USER} --mqtt_password ${MQTT_PASSWORD}"
fi

if [ -n "${RSSI}" ]; then
EXTRA_ARGS="${EXTRA_ARGS} --rssi"
fi

if [ -n "${SYS_MODULE_TO_RELOAD}" ]; then
Expand All @@ -30,9 +34,11 @@ fi

echo "Starting evseMQTT ..."

/usr/local/bin/evseMQTT ${MQTT_ARGS} \
set -ex

/usr/local/bin/evseMQTT \
--address "${BLE_ADDRESS}" \
--password "${BLE_PASSWORD}" \
--unit "${UNIT}" \
--rssi "${RSSI}" \
--logging_level "${LOGGING_LEVEL}"
--logging_level "${LOGGING_LEVEL}" \
${EXTRA_ARGS}

0 comments on commit 451cd89

Please sign in to comment.