From 8cf36a4264fd6f9ec40752806c141f9a87ecb867 Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Mon, 15 Jun 2026 07:54:51 +0200 Subject: [PATCH] docs(rc): simplify colibri daemon service comments (Sam & Codex) Keep the FreeBSD rc.d comments focused on the intended service contract instead of historical repair details.\n\nChecks: sh -n packaging/freebsd/colibri_daemon.in; git diff --check. --- packaging/freebsd/colibri_daemon.in | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packaging/freebsd/colibri_daemon.in b/packaging/freebsd/colibri_daemon.in index 0756a5b..2f3ccf6 100644 --- a/packaging/freebsd/colibri_daemon.in +++ b/packaging/freebsd/colibri_daemon.in @@ -58,8 +58,7 @@ supervisor_pidfile="${colibri_daemon_run_dir}/colibri-daemon-supervisor.pid" # -p child pidfile (writes colibri-daemon PID — used by start/status) # -r restart on crash, -t process title, # -o append stdout/stderr to log. -# rc.subr already runs the command as ${colibri_daemon_user}; do not also pass -# daemon(8) -u or daemon(8) will try to drop privileges a second time. +# User selection is handled by rc.subr through colibri_daemon_user. command="/usr/sbin/daemon" command_args="-P ${supervisor_pidfile} -p ${pidfile} -r -t ${name} \ -o ${colibri_daemon_logfile} ${colibri_daemon_binary}" @@ -85,9 +84,8 @@ colibri_daemon_prestart() install -d -o "${colibri_daemon_user}" -g "${colibri_daemon_group}" -m 0750 \ "$(/usr/bin/dirname "${colibri_daemon_logfile}")" - # Remove stale runtime files while rc.d is still root. The daemon process - # runs as colibri and cannot unlink a stale socket left behind by a prior - # root/corrupt manual start. + # Clear runtime files before starting so repeated service starts always + # bind a fresh socket and write fresh pidfiles. rm -f "${colibri_daemon_socket}" "${pidfile}" "${supervisor_pidfile}" # Provider keys are optional. Keep them in a root-owned env file instead of