mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 20:27:15 +01:00
Some checks failed
dependency freshness / dependencies on newest stable (push) Has been cancelled
file length / file-length (push) Has been cancelled
md-naming / markdown naming convention (push) Has been cancelled
omniroute_offload pre-commit / pre-commit (push) Has been cancelled
palette drift / palette (push) Has been cancelled
repo-contract / repo contract (push) Has been cancelled
shared gate tests / gate unit tests (push) Has been cancelled
omniroute-gateway start|health|update|backup|combo keeps the local OmniRoute gateway up. systemd --user timers: health every 10 min (real free-best chat; restart <=1/30 min, reactivate providers whose cooldown ended, notify once per outage), update weekly Sun 12:00 (backup, newest stable -web tag, rollback of image + volume on a failed health check). Failure modes: health/update fail loudly (exit 1 + desktop + Signal); all providers cooling = degraded (exit 0, one notice/day); a missing signal-bot .env logs and exits non-zero on alert paths; health skips while update holds the lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWZSdJmNjGUvLnHJ4WG
20 lines
845 B
Bash
Executable File
20 lines
845 B
Bash
Executable File
#!/bin/bash
|
|
# Install free-llm + omniroute-gateway (system python, editable), claude-free, and the gateway timers.
|
|
set -euo pipefail
|
|
|
|
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
readonly REPO_DIR
|
|
readonly SYSTEM_PYTHON="/usr/bin/python3"
|
|
readonly BIN_DIR="${HOME}/.local/bin"
|
|
readonly UNIT_DIR="${HOME}/.config/systemd/user"
|
|
|
|
"${SYSTEM_PYTHON}" -m pip install --user --no-deps --break-system-packages -q -e "${REPO_DIR}"
|
|
mkdir -p "${BIN_DIR}" "${UNIT_DIR}"
|
|
ln -sf "${REPO_DIR}/bin/claude-free" "${BIN_DIR}/claude-free"
|
|
command -v free-llm free-llm-read-hook free-llm-check-dir claude-free omniroute-gateway
|
|
|
|
install -m644 "${REPO_DIR}"/systemd/omniroute-* "${UNIT_DIR}/"
|
|
systemctl --user daemon-reload
|
|
systemctl --user enable --now omniroute-health.timer omniroute-update.timer
|
|
systemctl --user list-timers 'omniroute-*' --no-pager
|