From fad6477c2aa5e3735bb5bd8247772608a0973535 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 4 Sep 2023 11:20:49 +0200 Subject: [PATCH] do not exit if TZ is set Signed-off-by: Simon L --- Containers/mastercontainer/start.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index c256ed3c..470d5ea4 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -253,17 +253,20 @@ if [ "$?" = 6 ]; then exit 1 fi -# Check that no changes have been made to timezone settings since AIO only supports running in UTC timezone +# Check that no changes have been made to timezone settings since AIO only supports running in Etc/UTC timezone if [ -n "$TZ" ]; then - print_red "The environmental variable TZ has been set which is not supported by AIO since it only supports running in the default UTC timezone!" + print_red "The environmental variable TZ has been set which is not supported by AIO since it only supports running in the default Etc/UTC timezone!" + echo "The correct timezone can be set in the AIO interface later on!" + # Disable exit since it seems to be by default set on unraid and we dont want to break these instances + # exit 1 +fi +if mountpoint -q /etc/localtime; then + print_red "/etc/localtime has been mounted into the container which is not allowed because AIO only supports running in the default Etc/UTC timezone!" echo "The correct timezone can be set in the AIO interface later on!" exit 1 -elif mountpoint -q /etc/localtime; then - print_red "/etc/localtime has been mounted into the container which is not allowed because AIO only supports running in the default UTC timezone!" - echo "The correct timezone can be set in the AIO interface later on!" - exit 1 -elif mountpoint -q /etc/timezone; then - print_red "/etc/timezone has been mounted into the container which is not allowed because AIO only supports running in the default UTC timezone!" +fi +if mountpoint -q /etc/timezone; then + print_red "/etc/timezone has been mounted into the container which is not allowed because AIO only supports running in the default Etc/UTC timezone!" echo "The correct timezone can be set in the AIO interface later on!" exit 1 fi