From 4041609c93ad7e5e8e702304a06cc172c7b1ebdd Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 9 May 2022 07:51:32 +0200 Subject: [PATCH] Update 99-run.sh --- filebrowser/rootfs/etc/cont-init.d/99-run.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ###################