rein-aharness/deploy/scripts/install-claim-loop-user.sh
tegwick 8200a672ea Implement REIN-A-0002 ops_run claim loop and approach registry.
Add activity-core ops_run client, approach selection (FI/Binky/mail/agent),
claim-loop worker with lease heartbeat, CLI run --from-ops-run and claim-loop,
install units, and docs demoting issue-core to legacy external tickets.
T05 timer cutover remains operator after five clean cycles.
2026-08-03 20:04:25 +02:00

31 lines
1.3 KiB
Bash
Executable file

#!/usr/bin/env bash
# Install rein-aharness claim-loop as a user systemd service (railiance01).
# Run from a rein-aharness checkout ON the host:
# ./deploy/scripts/install-claim-loop-user.sh
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
UNIT_DIR="${HOME}/.config/systemd/user"
ENV_DIR="${HOME}/.config/rein-aharness"
mkdir -p "${UNIT_DIR}" "${ENV_DIR}"
cp -f "${ROOT}/deploy/systemd/rein-aharness-claim-loop.service" "${UNIT_DIR}/"
if [[ ! -f "${ENV_DIR}/claim-loop.env" ]]; then
cp "${ROOT}/deploy/systemd/claim-loop.env.example" "${ENV_DIR}/claim-loop.env"
chmod 600 "${ENV_DIR}/claim-loop.env"
echo "Created ${ENV_DIR}/claim-loop.env — set ACTIVITY_CORE_URL, token, REPO_MAP."
else
echo "Keeping existing ${ENV_DIR}/claim-loop.env"
fi
# Ensure package entrypoint exists
if [[ ! -x "${ROOT}/.venv/bin/rein-aharness" ]]; then
echo "warning: ${ROOT}/.venv/bin/rein-aharness missing; install with: cd ${ROOT} && uv sync"
fi
systemctl --user daemon-reload
systemctl --user enable rein-aharness-claim-loop.service
echo "Enabled. Start when env is filled:"
echo " systemctl --user start rein-aharness-claim-loop.service"
echo " journalctl --user -u rein-aharness-claim-loop -f"
echo "Host timers remain break-glass until T05 cutover (docs/ops-run-claim-loop.md)."