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"