feat: import Landwelle v1.5.62 source

This commit is contained in:
root committed 2026-09-24 11:27:18 +02:00
1 parent e521a98535
commit ac1e072f4e
496 files changed
+74796 -34

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
ENV_FILE="${LANDWELLE_ENV_FILE:-/etc/landwelle/landwelle.env}"
BACKUP="${1:-}"
[[ $EUID -eq 0 ]] || { echo "Bitte mit sudo starten." >&2; exit 1; }
[[ -n "$BACKUP" && -f "$BACKUP" ]] || { echo "Aufruf: sudo $0 /pfad/backup.dump" >&2; exit 1; }
set -a; source "$ENV_FILE"; set +a
[[ -n "${DATABASE_URL:-}" ]] || { echo "DATABASE_URL fehlt." >&2; exit 1; }
command -v pg_restore >/dev/null || { echo "pg_restore fehlt." >&2; exit 1; }
systemctl stop landwelle-radio
pg_restore --dbname="$DATABASE_URL" --clean --if-exists --no-owner --no-privileges "$BACKUP"
systemctl start landwelle-radio
curl -fsS http://127.0.0.1:2200/ready >/dev/null
printf 'Wiederherstellung erfolgreich: %s\n' "$BACKUP"