Load Restic credentials from ~/.restic-env in backup/restore scripts

This commit is contained in:
Hördle Bot
2025-12-04 13:49:55 +01:00
parent 702f47b7e5
commit c02d3df7ed
2 changed files with 11 additions and 0 deletions

View File

@@ -4,6 +4,11 @@
set -e
if [ -f "$HOME/.restic-env" ]; then
# shellcheck source=/dev/null
. "$HOME/.restic-env"
fi
echo "💾 Creating Restic backup..."
if ! command -v restic >/dev/null 2>&1; then

View File

@@ -22,6 +22,12 @@
set -e
# Optional: Restic-Umgebungsvariablen aus ~/.restic-env laden
if [ -f "$HOME/.restic-env" ]; then
# shellcheck source=/dev/null
. "$HOME/.restic-env"
fi
echo "💾 Restoring from Restic backup..."
if ! command -v restic >/dev/null 2>&1; then