Auto-commit: 2026-04-15 11:02

This commit is contained in:
OpenClaw
2026-04-15 11:02:59 +00:00
parent eac3eaeb00
commit a62e89ad99
12 changed files with 1632 additions and 0 deletions

20
scripts/commit-and-sync.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Git commit + Sync zu TrueNAS
WORKSPACE="/root/.openclaw/workspace"
cd "$WORKSPACE"
# Git: alle Änderungen committen
echo "=== Git Commit ==="
git add -A
if git diff --cached --quiet; then
echo "No changes to commit"
else
git commit -m "Auto-commit: $(date '+%Y-%m-%d %H:%M')" 2>&1
git push origin master 2>&1
fi
# Sync zu TrueNAS
echo ""
echo "=== Sync zu TrueNAS ==="
bash "$WORKSPACE/scripts/sync-to-truenas.sh"

23
scripts/sync-to-truenas.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
# Sync Workspace zu TrueNAS SMB Share
# Wird nach Änderungen aufgerufen
MOUNT_POINT="/mnt/openclaw-smb"
SMB_SHARE="//192.168.8.112/openclaw"
WORKSPACE="/root/.openclaw/workspace"
# Mount prüfen, falls nicht gemountet → mounten
if ! mountpoint -q "$MOUNT_POINT"; then
echo "Mounting SMB share..."
mount -t cifs "$SMB_SHARE" "$MOUNT_POINT" -o credentials=/root/.smb-credentials,vers=3.0 2>/dev/null
if [ $? -ne 0 ]; then
echo "ERROR: Could not mount SMB share"
exit 1
fi
fi
# Workspace zu SMB syncen (ohne .git)
echo "Syncing workspace to TrueNAS..."
rsync -avz --delete --exclude='.git' "$WORKSPACE/" "$MOUNT_POINT/workspace/"
echo "Sync complete: $(date)"