From 1a1b6fd896e0c6fdd232a1810b6c6efcb1898536 Mon Sep 17 00:00:00 2001 From: Erik Thiele Date: Thu, 30 Jul 2026 15:51:45 +0200 Subject: [PATCH] Set container timezone during Proxmox install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Debian LXC templates default to UTC, which made the "hinzugefügt am" timestamps and export filenames look wrong. Add a TIMEZONE variable (default Europe/Berlin) applied via timedatectl during install, and document it in the README. Co-Authored-By: Claude Sonnet 5 --- README.md | 1 + scripts/proxmox/install-linkvault.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 3d18e16..8cdf85c 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ Alle Einstellungen lassen sich per Umgebungsvariable vor dem Aufruf setzen | `REPO_URL` | Git-Repo, das geklont wird | `.../ethiele/linkvault.git` | | `APP_PORT` | Port, auf dem uvicorn lauscht | `8000` | | `GIT_TOKEN` | Gitea Access Token (nur bei privatem Repo) | – | +| `TIMEZONE` | Zeitzone des Containers (`timedatectl`) | `Europe/Berlin` | Beispiel mit statischer IP und fester Container-ID: diff --git a/scripts/proxmox/install-linkvault.sh b/scripts/proxmox/install-linkvault.sh index 57ba8aa..a7e784f 100755 --- a/scripts/proxmox/install-linkvault.sh +++ b/scripts/proxmox/install-linkvault.sh @@ -33,6 +33,7 @@ CT_PASSWORD="${CT_PASSWORD:-}" # leer = zufällig generiert REPO_URL="${REPO_URL:-https://gitea.teamthiele.de/ethiele/linkvault.git}" APP_PORT="${APP_PORT:-8000}" GIT_TOKEN="${GIT_TOKEN:-}" # Gitea Access Token, falls Repo privat ist +TIMEZONE="${TIMEZONE:-Europe/Berlin}" # wirkt sich auf die angezeigten Datumsangaben aus # --------------------------------------------------------------------------- # Vorbedingungen @@ -50,6 +51,7 @@ echo "==> Container-ID: $CTID" echo "==> Hostname: $CT_HOSTNAME" echo "==> Storage (RootFS): $CT_STORAGE" echo "==> Netzwerk: $CT_BRIDGE / $CT_IP" +echo "==> Zeitzone: $TIMEZONE" # --------------------------------------------------------------------------- # Debian-12-Template sicherstellen @@ -114,6 +116,8 @@ export DEBIAN_FRONTEND=noninteractive apt-get update -qq apt-get install -y -qq git python3 python3-venv python3-pip build-essential curl >/dev/null +timedatectl set-timezone '${TIMEZONE}' || echo 'Warnung: Zeitzone ${TIMEZONE} konnte nicht gesetzt werden.' + if [ ! -d /opt/linkvault ]; then if [ -n '${GIT_TOKEN}' ]; then git -c http.extraHeader=\"Authorization: token ${GIT_TOKEN}\" clone --quiet '${REPO_URL}' /opt/linkvault