From 1a72767ef0f552e2fb50cca0641d26e103c201a4 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 18 Nov 2021 15:55:06 +0100 Subject: [PATCH] Update 99-run.sh --- enedisgateway2mqtt/rootfs/scripts/99-run.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/enedisgateway2mqtt/rootfs/scripts/99-run.sh b/enedisgateway2mqtt/rootfs/scripts/99-run.sh index a4915bd74..01a0249c4 100644 --- a/enedisgateway2mqtt/rootfs/scripts/99-run.sh +++ b/enedisgateway2mqtt/rootfs/scripts/99-run.sh @@ -61,6 +61,15 @@ else rm $DATABASESOURCE fi +################ +# Set timezone # +################ +if bashio::config.has_value "TZ"; then + TZ=$(bashio::config "TZ") + bashio::log.info "Timezone set to $TZ" + ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +fi + ############## # Launch App # ############## @@ -68,8 +77,6 @@ echo " " bashio::log.info "Starting the app" echo " " -export TZ=$(bashio::config "TZ") - # Test mode if [ $TZ = "test" ]; then echo "secret mode found, launching script in /config/test.sh"