FreeBSD rc.d service for hermes gateway (daemon(8) supervision) #1

Merged
clawdie merged 2 commits from feat/freebsd-rcd-service into main 2026-06-14 15:21:26 +02:00

2 commits

Author SHA1 Message Date
Sam & Claude
3dd2b7a301 fix(freebsd): abort rc.d start on missing config; tidy README spacing
Some checks failed
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (pull_request) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (pull_request) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
Tests / test (1) (pull_request) Has been cancelled
Tests / test (2) (pull_request) Has been cancelled
Tests / test (3) (pull_request) Has been cancelled
Tests / test (4) (pull_request) Has been cancelled
Tests / e2e (pull_request) Has been cancelled
Tests / test (5) (pull_request) Has been cancelled
Tests / test (6) (pull_request) Has been cancelled
Tests / save-durations (pull_request) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
prestart now returns 1 when config.yaml is absent instead of only warning.
Without this, daemon(8) -r respawns the immediately-exiting gateway in a tight
crash loop; aborting the start surfaces a clear error to the operator instead.

Also drop a stray double blank line before the README Install fence.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 15:13:54 +02:00
9ba06a49f8 feat(freebsd): add rc.d service script for daemon(8) supervision
Adds packaging/freebsd/hermes_daemon.in — a FreeBSD rc.d service script
that runs hermes gateway under daemon(8) with:

- Privilege drop to a dedicated hermes user/group
- Persistent HERMES_HOME=/var/db/hermes (not tmpfs home)
- Supervisor/child pidfile separation (correct stop behavior)
- Auto-restart on crash (-r), log rotation (-o)
- health extra command for status checks
- prestart validation that config.yaml exists

Also updates:
- README-FreeBSD.md with full rc.d setup instructions
- scripts/install-freebsd.sh to mention the service path

Modeled after Colibri's proven colibri_daemon.in rc.d script.
2026-06-14 15:13:15 +02:00