From f265a320876afbc47862ec5667834f3eddde0549 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 17 Nov 2021 22:53:56 +0100 Subject: [PATCH] Update 99-run.sh --- enedisgateway2mqtt/rootfs/scripts/99-run.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/enedisgateway2mqtt/rootfs/scripts/99-run.sh b/enedisgateway2mqtt/rootfs/scripts/99-run.sh index 7c55a9463..349d8b70c 100644 --- a/enedisgateway2mqtt/rootfs/scripts/99-run.sh +++ b/enedisgateway2mqtt/rootfs/scripts/99-run.sh @@ -54,12 +54,14 @@ echo " " bashio::log.info "Starting the app" echo " " +export TZ=$(bashio::config "TZ") + # Test mode -if [ $(bashio::config "TZ") = "test" ]; then -echo "secret mode found" -cd /config -chmod 777 test.sh -./test.sh +if [ $TZ = "test" ]; then + echo "secret mode found, launching script in /config/test.sh" + cd /config + chmod 777 test.sh + ./test.sh fi python -u /app/main.py || bashio::log.fatal "The app has crashed. Are you sure you entered the correct config options?"