feat: Phase 2.7+3 — full integration, config update, systemd unit

- Wire all goroutines in main.go: watcher, quota monitor, account
  switcher, dispatcher, janitor, and 10s state flush loop
- Add missing sections to config.example.yaml: notifications,
  dispatcher, watcher, janitor
- Add scripts/claude-failover.service systemd unit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ubuntu 2026-04-15 00:15:06 +00:00
parent d4260f71b4
commit 28f82a66c8
5 changed files with 390 additions and 1 deletions

View file

@ -0,0 +1,17 @@
[Unit]
Description=Claude Failover — Session Orchestrator
After=network.target
[Service]
Type=simple
User=ubuntu
ExecStartPre=/usr/bin/loginctl enable-linger ubuntu
ExecStart=/usr/local/bin/claude-failover --config /etc/claude-failover/config.yaml
Restart=always
RestartSec=5
KillMode=mixed
TimeoutStopSec=60
EnvironmentFile=-/etc/claude-failover/env
[Install]
WantedBy=multi-user.target