Badal commited on
Commit ·
a8abfdf
1
Parent(s): 6a21b54
Real-time continuous sync - no delay
Browse files36 unmodified lines373839404142434445464748495051525354555657585960616236 unmodified linesecho '=== [STEP 2] OPENCODE STARTED ==='# ============================================# STEP 3: MONITOR & BACKUP LOOP# ============================================echo '=== [STEP 3] STARTING MONITOR & BACKUP SERVICE ==='while true; do# Check if OpenCode is still runningif ! pgrep -f 'opencode' > /dev/null; thenecho 'CRITICAL: OpenCode process died! Exiting container...'exit 1fi# Sync local TO bucket (backup) - full disk syncecho "$(date): Syncing backup..."hf sync "$SOURCE" "$BUCKET" \--deleteif [ $? -eq 0 ]; thenecho "$(date): Backup cycle complete."elseecho "$(date): Backup failed!"fisleep 3done36 unmodified lines3738394041424344454647484950515236 unmodified linesecho '=== [STEP 2] OPENCODE STARTED ==='# ============================================# STEP 3: REAL-TIME CONTINUOUS SYNC# ============================================echo '=== [STEP 3] STARTING REAL-TIME SYNC ==='while true; do# Check if OpenCode is still runningif ! pgrep -f 'opencode' > /dev/null; thenecho 'CRITICAL: OpenCode process died! Exiting container...'exit 1fi# Real-time continuous sync (no interval - continuous!)hf sync "$SOURCE" "$BUCKET" --deletedone
entrypoint.sh+4-14