From 3dd2b7a3011efca35f86a9a7360d908bef261ee0 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Sun, 14 Jun 2026 15:13:54 +0200 Subject: [PATCH] fix(freebsd): abort rc.d start on missing config; tidy README spacing 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 --- README-FreeBSD.md | 1 - packaging/freebsd/hermes_daemon.in | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README-FreeBSD.md b/README-FreeBSD.md index 933f57bdc..60bd13a3c 100644 --- a/README-FreeBSD.md +++ b/README-FreeBSD.md @@ -42,7 +42,6 @@ The service stores config in `/var/db/hermes` (persistent) instead of ## Install - ```sh sh scripts/install-freebsd.sh ``` diff --git a/packaging/freebsd/hermes_daemon.in b/packaging/freebsd/hermes_daemon.in index bf5eacc60..92e341b78 100644 --- a/packaging/freebsd/hermes_daemon.in +++ b/packaging/freebsd/hermes_daemon.in @@ -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 }