#!/bin/bash # Sync dyno.yml from Hetzner host "im" # Source: im:/matrix/traefik/config/dyno.yml # Destination: ~/scripts/configs/dyno.yml set -e DEST_DIR=~/scripts/configs DEST_FILE="$DEST_DIR/dyno.yml" mkdir -p "$DEST_DIR" echo "Syncing dyno.yml from im..." rsync -avP im:/matrix/traefik/config/dyno.yml "$DEST_FILE" echo "" echo "✅ Synced to: $DEST_FILE" echo "" # Show diff if in git repo if [ -d ~/scripts/.git ]; then cd ~/scripts if ! git diff --quiet configs/dyno.yml 2>/dev/null; then echo "Changes detected:" git diff configs/dyno.yml echo "" echo "To commit: cd ~/scripts && git add -A && git commit -m 'Update dyno.yml'" else echo "No changes from last sync." fi fi