diff --git a/filebrowser/rootfs/etc/cont-init.d/99-run.sh b/filebrowser/rootfs/etc/cont-init.d/99-run.sh index 99f7c8b98..7b477a396 100644 --- a/filebrowser/rootfs/etc/cont-init.d/99-run.sh +++ b/filebrowser/rootfs/etc/cont-init.d/99-run.sh @@ -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 ###################