Update 99-run.sh

This commit is contained in:
Alexandre
2022-05-09 07:51:32 +02:00
committed by GitHub
parent 82f31739cb
commit 4041609c93

View File

@@ -8,8 +8,12 @@
if bashio::config.has_value 'TZ'; then
TIMEZONE=$(bashio::config 'TZ')
bashio::log.info "Setting timezone to $TIMEZONE"
ln -snf /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime
echo "$TIMEZONE" >/etc/timezone
if [ -f /usr/share/zoneinfo/"$TIMEZONE" ]; then
ln -snf /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime
echo "$TIMEZONE" >/etc/timezone
else
bashio::log.fatal "$TIMEZONE not found, are you sure it is a valid timezone?"
fi
fi
###################