added message when defaulting timezone
This commit is contained in:
parent
342db2a122
commit
41a5010bfe
@ -43,7 +43,6 @@ services:
|
|||||||
POSTGRES_DB: paperless
|
POSTGRES_DB: paperless
|
||||||
POSTGRES_USER: paperless
|
POSTGRES_USER: paperless
|
||||||
POSTGRES_PASSWORD: paperless
|
POSTGRES_PASSWORD: paperless
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
|
||||||
|
|
||||||
webserver:
|
webserver:
|
||||||
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
image: ghcr.io/paperless-ngx/paperless-ngx:latest
|
||||||
|
@ -74,12 +74,13 @@ fi
|
|||||||
# Added handling for timezone for busybox based linux, not having timedatectl available (i.e. QNAP QTS)
|
# Added handling for timezone for busybox based linux, not having timedatectl available (i.e. QNAP QTS)
|
||||||
# if neither timedatectl nor /etc/TZ is suceeding, defaulting to GMT.
|
# if neither timedatectl nor /etc/TZ is suceeding, defaulting to GMT.
|
||||||
if command -v timedatectl &> /dev/null ; then
|
if command -v timedatectl &> /dev/null ; then
|
||||||
default_time_zone=$(timedatectl show -p Timezone --value)
|
default_time_zone=$(timedatectl show -p Timezone --value)
|
||||||
elif [ -f /etc/TZ ] && [ -f /etc/tzlist ] ; then
|
elif [ -f /etc/TZ ] && [ -f /etc/tzlist ] ; then
|
||||||
TZ=$(cat /etc/TZ)
|
TZ=$(cat /etc/TZ)
|
||||||
default_time_zone=$(grep -B 1 -m 1 "$TZ" /etc/tzlist | head -1 | cut -f 2 -d =)
|
default_time_zone=$(grep -B 1 -m 1 "$TZ" /etc/tzlist | head -1 | cut -f 2 -d =)
|
||||||
else
|
else
|
||||||
default_time_zone="Europe/London"
|
echo "WARN: unable to detect timezone, defaulting to Etc/UTC"
|
||||||
|
default_time_zone="Etc/UTC"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
Loading…
x
Reference in New Issue
Block a user