#!/usr/bin/env bash # Installs Peppa's launchd agents (start at login, restart on crash): # quest.telecom.peppa.watchdog — session watchdog under caffeinate -i (no idle sleep) # quest.telecom.peppa.web — Next.js platform on :3100 (needs `pnpm --filter @peppa/web build`); # PEPPA_WEB_MODE=dev runs `next dev` instead (HMR: edits in this # checkout go live without build or release — the pre-launch setup) # quest.telecom.peppa.bot — Telegram bot (TELEGRAM_BOT_TOKEN in .env) # quest.telecom.peppa.release — Peppa's own prod releases (PEP-18): started by launchd while # ~/.peppa/release-queue has requests (the PM's button) # Prod runs from the release directory: ~/peppa/current/scripts/install-launchd.sh, so every # path below (and PEPPA_ROOT for hooks and git config) is ~/peppa/current, not a release. # Pre-launch (everything is dev): PEPPA_WEB_MODE=dev scripts/install-launchd.sh watchdog web bot # from the working copy — no release agent, so nothing replaces what this checkout serves. # Usage: scripts/install-launchd.sh [watchdog] [web] [bot] [release] (default: all) # Remove: launchctl bootout gui/$(id -u)/