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>
This commit is contained in:
Sam & Claude 2026-06-14 15:13:54 +02:00
parent 9ba06a49f8
commit 3dd2b7a301
2 changed files with 5 additions and 3 deletions

View file

@ -42,7 +42,6 @@ The service stores config in `/var/db/hermes` (persistent) instead of
## Install
```sh
sh scripts/install-freebsd.sh
```

View file

@ -84,11 +84,14 @@ hermes_daemon_prestart()
export HERMES_HOME="${hermes_daemon_home}"
# Verify Hermes is configured before starting. The gateway exits
# immediately if no provider/model is configured.
# immediately if no provider/model is configured, and daemon(8) -r would
# then respawn it in a tight crash loop. Abort the start instead so the
# operator sees a clear, actionable error.
if [ ! -f "${hermes_daemon_home}/config.yaml" ]; then
echo "WARNING: Hermes config not found at ${hermes_daemon_home}/config.yaml"
echo "ERROR: Hermes config not found at ${hermes_daemon_home}/config.yaml"
echo " Run as operator: HERMES_HOME=${hermes_daemon_home} hermes setup"
echo " Then: HERMES_HOME=${hermes_daemon_home} hermes model"
return 1
fi
}