Seed colibri skills catalog at ISO build time #18
1 changed files with 22 additions and 0 deletions
22
build.sh
22
build.sh
|
|
@ -783,6 +783,28 @@ install_colibri_service() {
|
|||
echo "ERROR: colibri service user missing from live image"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Seed the skills catalog with operator-useful entries. The daemon
|
||||
# creates the SQLite DB on first start; pre-populate it so skills
|
||||
# are available immediately without a first-boot script.
|
||||
_colibri_db="${MOUNT_POINT}/var/db/colibri/colibri.sqlite"
|
||||
if command -v sqlite3 >/dev/null 2>&1; then
|
||||
sqlite3 "${_colibri_db}" "CREATE TABLE IF NOT EXISTS skills (
|
||||
id TEXT PRIMARY KEY NOT NULL,
|
||||
name TEXT NOT NULL UNIQUE,
|
||||
description TEXT,
|
||||
category TEXT,
|
||||
created_at TEXT NOT NULL
|
||||
);" 2>/dev/null || true
|
||||
_now=$(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
sqlite3 "${_colibri_db}" "INSERT OR IGNORE INTO skills (id, name, description, category, created_at) VALUES
|
||||
('$(uuidgen || echo 00000000-0000-0000-0000-000000000001)', 'freebsd-live-usb', 'FreeBSD live USB operator workstation procedures', 'freebsd', '${_now}'),
|
||||
('$(uuidgen || echo 00000000-0000-0000-0000-000000000002)', 'colibri-smoke', 'Colibri daemon smoke test and validation', 'colibri', '${_now}'),
|
||||
('$(uuidgen || echo 00000000-0000-0000-0000-000000000003)', 'iso-build', 'Clawdie ISO build and staging workflow', 'iso', '${_now}'),
|
||||
('$(uuidgen || echo 00000000-0000-0000-0000-000000000004)', 'tailscale-join', 'Tailscale mesh join procedure for operator USB', 'networking', '${_now}');" 2>/dev/null || true
|
||||
chroot "${MOUNT_POINT}" chown colibri:colibri /var/db/colibri/colibri.sqlite 2>/dev/null || true
|
||||
echo " colibri skills seeded: 4 entries"
|
||||
fi
|
||||
}
|
||||
|
||||
install_clawdie_service() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue