Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
install script: configure time zone
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaswinkler committed Apr 6, 2021
1 parent 645297d commit a3c4e4c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion install-paperless-ng.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if [[ -z $(which docker-compose) ]] ; then
exit 1
fi

# Check if user has permissions to run Docker by trying to get the status of Docker (docker status).
# Check if user has permissions to run Docker by trying to get the status of Docker (docker status).
# If this fails, the user probably does not have permissions for Docker.
docker stats --no-stream 2>/dev/null 1>&2
if [ $? -ne 0 ] ; then
Expand All @@ -73,6 +73,8 @@ if [ $? -ne 0 ] ; then
sleep 3
fi

default_time_zone=$(timedatectl show -p Timezone --value)

set -e

echo ""
Expand Down Expand Up @@ -145,6 +147,15 @@ echo ""
ask "Port" "8000"
PORT=$ask_result

echo ""
echo "Paperless requires you to configure the current time zone correctly."
echo "Otherwise, the dates of your documents may appear off by one day,"
echo "depending on where you are on earth."
echo ""

ask "Current time zone" "$default_time_zone"
TIME_ZONE=$ask_result

echo ""
echo "Database backend: PostgreSQL and SQLite are available. Use PostgreSQL"
echo "if unsure. If you're running on a low-power device such as Raspberry"
Expand Down Expand Up @@ -280,6 +291,7 @@ DEFAULT_LANGUAGES="deu eng fra ita spa"
if [[ ! $USERMAP_GID == "1000" ]] ; then
echo "USERMAP_GID=$USERMAP_GID"
fi
echo "PAPERLESS_ZIME_ZONE=$TIME_ZONE"
echo "PAPERLESS_OCR_LANGUAGE=$OCR_LANGUAGE"
echo "PAPERLESS_SECRET_KEY=$SECRET_KEY"
if [[ ! " ${DEFAULT_LANGUAGES[@]} " =~ " ${OCR_LANGUAGE} " ]] ; then
Expand Down

0 comments on commit a3c4e4c

Please sign in to comment.