Update 99-run.sh

This commit is contained in:
Alexandre
2021-11-18 16:01:33 +01:00
committed by GitHub
parent d70f61e007
commit e34e76e30d

View File

@@ -66,8 +66,11 @@ fi
################
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
if [ -f /usr/share/zoneinfo/$TZ ]; then
bashio::log.info "Timezone set from $(cat /etc/timezone) to $TZ"
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
else
bashio::log.warning "Timezone $TZ is invalid, it will be kept to default value of $(cat /etc/timezone)"
fi
##############