From 378e807e916a3a8ef46f1f4f4415f9f030efb123 Mon Sep 17 00:00:00 2001 From: b2un0 Date: Wed, 1 Jan 2025 14:31:46 +0100 Subject: [PATCH] fix rssi argument in docker container --- entrypoint.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ceefde2..5be16d2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 @@ -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}