Every campus matches NA, tailored: Restart page, Companion-Mac programs, NA's auto-fix hours, nightly backups, restart from NA
- Auto-setup: programs on the Companion Mac itself (ProPresenter at Woonsocket) get a local process check and local start/restart fixes; every campus gets a Restart page (keys arrive as computers join); NA's auto-fix hours (Tue, Wed, Sun); a program found after its Companion connection joins that key instead of making a second one. settings.campus rebuild remakes a campus from what is found now, keeping its name, PIN and pages; upgrade-companion brings Companion to 5.0.7 from NA's copy (/campus/companion.zip), as Woonsocket was; setup stops with that advice on an older one. - NA's CAMPUSES page has a RESTART key per campus; the CAMPUS page shows that campus's Restart page and a hold there restarts it at that campus. - Backups: backup/backup-campuses.sh, nightly 04:30 on NA (installed everywhere, acts on the hub), into Drive > Waters Creative > Apps > Status Panel Backups/<campus>, 30 kept, alert email via the checklist's alert.js. Campuses report the account to back up with. sites/ws/config.json in the repo. - Woonsocket rebuilt: 9 keys (PROP with ProPresenter on its Mac), Restart page 20 (SUPERRACK, VISTA, ABLETON, PROP), auto-fix on NA's hours; all OK. Both campuses backed up to Drive by the job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+22
@@ -217,6 +217,28 @@ rm -rf "$DEST/kit" && mkdir -p "$DEST/kit/sites"
|
||||
cp "$SRC/install.sh" "$DEST/kit/"
|
||||
[[ -f "$SRC/README.md" ]] && cp "$SRC/README.md" "$DEST/kit/"
|
||||
[[ -d "$SRC/sites/_template" ]] && cp -R "$SRC/sites/_template" "$DEST/kit/sites/"
|
||||
# The nightly off-site backup of every campus's settings (does anything only on the hub, NA).
|
||||
if [[ -d "$SRC/backup" ]]; then
|
||||
rm -rf "$DEST/backup" && cp -R "$SRC/backup" "$DEST/" && chmod +x "$DEST/backup/"*.sh
|
||||
BACKUP_LABEL=org.waterschurch.status-backup
|
||||
BACKUP_PLIST="$HOME/Library/LaunchAgents/$BACKUP_LABEL.plist"
|
||||
cat > "$BACKUP_PLIST" <<EOF2
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key><string>$BACKUP_LABEL</string>
|
||||
<key>ProgramArguments</key><array><string>/bin/bash</string><string>$DEST/backup/backup-campuses.sh</string></array>
|
||||
<key>EnvironmentVariables</key><dict><key>PATH</key><string>/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin</string></dict>
|
||||
<key>StartCalendarInterval</key><dict><key>Hour</key><integer>4</integer><key>Minute</key><integer>30</integer></dict>
|
||||
<key>StandardErrorPath</key><string>$HOME/Library/Logs/status-panel-backup.err.log</string>
|
||||
<key>StandardOutPath</key><string>$HOME/Library/Logs/status-panel-backup.out.log</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF2
|
||||
launchctl bootout "$DOMAIN/$BACKUP_LABEL" 2>/dev/null || true
|
||||
launchctl bootstrap "$DOMAIN" "$BACKUP_PLIST" 2>/dev/null || true
|
||||
fi
|
||||
# The panel's own login key for the other computers (made once, never replaced).
|
||||
if [[ ! -f "$HOME/.ssh/id_status_panel" ]]; then
|
||||
mkdir -p "$HOME/.ssh" && chmod 700 "$HOME/.ssh"
|
||||
|
||||
Reference in New Issue
Block a user