Merge pull request 'fix(clawdie): set COLIBRI_DB_PATH so the service does not crash-loop at boot' (#16) from fix/clawdie-db-path into main

This commit is contained in:
clawdie 2026-06-02 17:58:24 +02:00
commit 067fee778c

View file

@ -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).