managarten/scripts/mac-mini/launchd
Till JS 7ff72d6c2c feat(monitoring): auto-prune Docker + node_modules, 15-min disk check interval
- check-disk-space.sh: always prune dangling images, unused volumes, and
  build cache >7 days on every run (not just at critical threshold)
- check-disk-space.sh: auto-remove node_modules if found on server
  (never needed — Docker builds inside containers)
- disk-check launchd: reduce interval from 60min to 15min to catch
  disk issues faster (yesterday we hit 100% before hourly check caught it)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:14:13 +02:00
..
com.manacore.backup-databases.plist feat(mac-mini): add stability improvements 2026-02-12 13:33:44 +01:00
com.manacore.disk-check.plist feat(monitoring): auto-prune Docker + node_modules, 15-min disk check interval 2026-03-30 20:14:13 +02:00
com.manacore.docker-startup.plist feat(mac-mini): add stability improvements 2026-02-12 13:33:44 +01:00
com.manacore.ensure-containers.plist 🔧 fix(mac-mini): correct user path in LaunchD plist 2026-02-12 13:15:06 +01:00
com.manacore.health-check.plist feat(mac-mini): add stability improvements 2026-02-12 13:33:44 +01:00
com.manacore.image-gen.plist feat(mac-mini): add stability improvements 2026-02-12 13:33:44 +01:00
com.manacore.mana-stt.plist feat(mac-mini): add stability improvements 2026-02-12 13:33:44 +01:00
com.manacore.mana-tts.plist feat(mac-mini): add stability improvements 2026-02-12 13:33:44 +01:00
com.manacore.ssd-check.plist feat(mac-mini): add stability improvements 2026-02-12 13:33:44 +01:00
com.manacore.telegram-ollama-bot.plist feat(mac-mini): add stability improvements 2026-02-12 13:33:44 +01:00
com.manacore.weekly-report.plist feat(monitoring): add alerting stack and maintenance scripts 2026-02-12 13:46:57 +01:00
README.md feat(monitoring): add alerting stack and maintenance scripts 2026-02-12 13:46:57 +01:00

LaunchD Services for Mac Mini

These plist files configure automatic services on the Mac Mini server.

Installation

# Copy all plists to LaunchAgents
cp *.plist ~/Library/LaunchAgents/

# Load all services
for f in *.plist; do launchctl load ~/Library/LaunchAgents/$f; done

Services

Service Description Interval
docker-startup Starts Docker containers on boot At login
ensure-containers Detects and restarts stuck/crash-looping containers Every 5 min
health-check Checks all services and sends alerts Every 5 min
backup-databases PostgreSQL backup with daily/weekly rotation Daily 3 AM
disk-check Monitors disk space, alerts on thresholds Hourly
weekly-report Generates system health summary Sunday 10 AM
ssd-check Monitors SSD health Periodic
mana-stt Speech-to-text service (Whisper) At login
mana-tts Text-to-speech service (Kokoro) At login
image-gen Image generation service At login
telegram-ollama-bot Telegram bot with Ollama At login

Management Commands

# Check status
launchctl list | grep manacore

# View logs
tail -f /tmp/manacore-*.log

# Reload a service
launchctl unload ~/Library/LaunchAgents/com.manacore.health-check.plist
launchctl load ~/Library/LaunchAgents/com.manacore.health-check.plist

# Stop a service
launchctl unload ~/Library/LaunchAgents/com.manacore.<service>.plist

Troubleshooting

Exit codes in launchctl list:

  • 0 = Running successfully
  • 1 = Last run had errors (check logs)
  • - = Not running / waiting for next interval
  • 78 = Configuration error

Check error logs:

cat /tmp/manacore-<service>.error.log