#!/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`) # 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. # Usage: scripts/install-launchd.sh [watchdog] [web] [bot] [release] (default: all) # Remove: launchctl bootout gui/$(id -u)/