Pi deploy schedule (staging + rollback + watchdog) =============================================== Folders (siblings under ~topbox): ~/DyzineFrame/ live app ~/DyzineFrame-Staging/ persistent Dropbox mirror (SGVI/DyzineFrame) ~/DyzineFrame-Rollback/ last-known-good code snapshot Dropbox (rclone account root): SGVI/DyzineFrame Win11 ship folder SGVI/DyzineFrame/Win11 is excluded from Pi pulls. What deploy updates vs preserves -------------------------------- UPDATES: Assets/01..16/, Assets/Shared/ (PNGs, layouts, particle art) content/*.png|jpg (splash, OUT OF ORDER — not logo *.mp4) *.py, reusable_odometer/, ohd_layouts/, shell scripts PRESERVES: config.ini, log/, run/, Enrollment.csv content/*.mp4 (logo-loop videos — large, per-site install) SGVI ad folders (e.g. ~/DyzineFrame/758_Bar_and_Restaurant/) — synced by sync.py from Enrollment.csv, not from Dropbox Flags: ~/DyzineFrame/run/staging-pending set when staging differs from live (green disc, lower-left, while pending) ~/DyzineFrame/run/watchdog.disabled stop crash watchdog Hourly (stage only): bash ~/DyzineFrame/sync/stage_from_dropbox.sh — rclone copy deltas into ~/DyzineFrame-Staging — sets staging-pending when promote would change live code Daily 03:00 America/St_Thomas (promote if pending): bash ~/DyzineFrame/sync/promote_staging.sh — Timezone pinned on the systemd timer (AST, UTC-4, no DST) — snapshot live deploy tree → ~/DyzineFrame-Rollback — rsync staging → live (preserves config/content/log/run) — restarts DyzineFrame (PROMOTE_RESTART=1) Next boot: run_supervisor.sh promotes once before the first DyzineFrame spawn if staging-pending is set (does not re-promote on a crash restart) Operator override (logged-in field config): http://:31234/EtherGold/config — Update Now = stage + promote + restart — Revert to last working = rollback_live.sh + restart Install timers (once per Pi): bash ~/DyzineFrame/sync/install_pi_deploy_schedule.sh sudo loginctl enable-linger topbox # also installs HTTPS Date clock fallback (12h) if sudo -n works: # bash ~/DyzineFrame/sync/install_http_date_sync.sh Manual stage only (no promote): bash ~/DyzineFrame/sync/pull_from_dropbox.sh PROMOTE_NOW=1 for a bench immediate promote Ship / stock seed (Michigan TopBox cards — promote now, no SSH display restart): Office LAN (preferred for the 10.1.10.x roster): .\EtherGold\sync\seed_dyzineframe_stock.ps1 Single Pi via Dropbox: bash ~/DyzineFrame/sync/seed_from_dropbox.sh Watchdog (autostart via topboxboot.desktop → run_supervisor.sh): — restart DyzineFrame on crash (same 30s / 300s backoff as Win11 OHD) — 2 consecutive rapid crashes → rollback_live.sh from ~/DyzineFrame-Rollback Logs: ~/DyzineFrame/log/supervisor.log ~/DyzineFrame/log/stage.log (systemd timer) ~/DyzineFrame/log/promote.log (systemd timer)