Fix sync-dyno.sh for cron compatibility
- Use explicit SSH options (-o StrictHostKeyChecking=no) - Use full user@host instead of SSH alias for cron environment - Add success log message after sync Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
9a97beeaf9
commit
8198980db1
1 changed files with 4 additions and 2 deletions
|
|
@ -21,12 +21,14 @@ if [ -f "$LOG_FILE" ] && [ $(stat -c%s "$LOG_FILE" 2>/dev/null || echo 0) -gt 10
|
|||
mv "$LOG_FILE" "$LOG_FILE.old"
|
||||
fi
|
||||
|
||||
# Sync file
|
||||
if ! rsync -az im:/matrix/traefik/config/dyno.yml "$DEST_FILE" 2>> "$LOG_FILE"; then
|
||||
# Sync file - use explicit SSH options for cron compatibility
|
||||
if ! rsync -az -e "ssh -o StrictHostKeyChecking=no" maddox@192.168.12.3:/matrix/traefik/config/dyno.yml "$DEST_FILE" 2>> "$LOG_FILE"; then
|
||||
log "ERROR: rsync failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Synced dyno.yml"
|
||||
|
||||
# Check for changes and auto-commit/push
|
||||
cd "$SCRIPTS_DIR"
|
||||
if [ -d .git ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue