This commit is contained in:
Andre Geißler
2025-11-29 23:46:27 +01:00
parent d33f83097b
commit f56dde052c

View File

@@ -1,24 +0,0 @@
#!/bin/bash
REPO="/opt/git-sync/"
TARGET="/"
# sicherstellen dass Repo existiert
if [ ! -d "$REPO/.git" ]; then
echo "Git-Repo nicht gefunden: $REPO"
exit 1
fi
# Aktualisieren
cd "$REPO" || exit 1
git stash push -m "auto-sync"
git pull --rebase
git stash pop
# Dateien verteilen (rootfs → /)
sudo rsync -a rootfs/ "$TARGET"
sudo -u andre chmod 600 /home/andre/.ssh/*
exit 0