diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 444521b..7097dc1 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,13 +1,15 @@ #!/bin/bash function setTimeZone { - CLIENT_TIMEZONE=$(cat /etc/timezone) - HOST_TIMEZONE=$(cat /etc/timezone.host) + if [ -f "/etc/timezone.host" ]; then + CLIENT_TIMEZONE=$(cat /etc/timezone) + HOST_TIMEZONE=$(cat /etc/timezone.host) - if [ "${CLIENT_TIMEZONE}" != "${HOST_TIMEZONE}" ]; then - echo "Reconfigure timezone to "${HOST_TIMEZONE} - echo ${HOST_TIMEZONE} > /etc/timezone - dpkg-reconfigure -f noninteractive tzdata + if [ "${CLIENT_TIMEZONE}" != "${HOST_TIMEZONE}" ]; then + echo "Reconfigure timezone to "${HOST_TIMEZONE} + echo ${HOST_TIMEZONE} > /etc/timezone + dpkg-reconfigure -f noninteractive tzdata + fi fi }