diff --git a/packaging/freebsd/clawdie.in b/packaging/freebsd/clawdie.in index 375fc3c..f40abb5 100644 --- a/packaging/freebsd/clawdie.in +++ b/packaging/freebsd/clawdie.in @@ -41,6 +41,7 @@ load_rc_config $name : ${clawdie_data_dir:="/var/db/clawdie"} : ${clawdie_run_dir:="/var/run/clawdie"} : ${clawdie_socket:="${clawdie_run_dir}/clawdie.sock"} +: ${clawdie_db_path:="${clawdie_data_dir}/clawdie.sqlite"} : ${clawdie_logfile:="/var/log/clawdie/clawdie.log"} : ${clawdie_host:="$(/bin/hostname)"} : ${clawdie_env_file:="/usr/local/etc/clawdie/clawdie.env"} @@ -68,8 +69,13 @@ clawdie_prestart() "$(/usr/bin/dirname "${clawdie_logfile}")" # Control-plane config passed to the child via the environment. + # COLIBRI_DB_PATH is REQUIRED: without it the daemon falls back to + # /var/db/colibri/colibri.sqlite (the full Colibri daemon's path, owned by + # the colibri user), which the clawdie user cannot open — Store::open then + # panics and daemon(8) -r restart-loops. Keep clawdie's DB in its own dir. export COLIBRI_DAEMON_DATA_DIR="${clawdie_data_dir}" export COLIBRI_DAEMON_SOCKET="${clawdie_socket}" + export COLIBRI_DB_PATH="${clawdie_db_path}" export COLIBRI_HOST="${clawdie_host}" # Optional per-host credential overrides (binary already has baked defaults).