Add Library Catalog addon, lib/docker.sh and tests

- lib/docker.sh: shared Docker/Compose tooling (on-demand install via apt or
  get.docker.com, compose wrapper, container state/health, HTTP wait)
- menus/addon_library.sh: install/update/uninstall the Koha + Quick Add stack
  from library/ to /opt/kiosk-library, add the catalogue as a kiosk page
  (duration 0), choose kiosk-only vs LAN access, show addresses and login
- wire into install.sh menu, complete_uninstall and clone_settings
- tests/addon_library.test.sh: 41 checks against a stub sudo/docker and a
  fixture stack (no root, Docker or network needed)

Note: the 'network access' choice relies on a BIND_ADDR setting in the
library stack, added in a follow-up commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013wi3ZSot4XbUViwRFgLpRf
This commit is contained in:
Claude
2026-11-06 10:29:22 +00:00
parent 2ef8f68b9b
commit 24c95c91f2
7 changed files with 655 additions and 4 deletions
+5
View File
@@ -42,6 +42,11 @@
# other addon's own scripts.
: "${WEBUI_HELPER_PATH:=$BIN_DIR/kiosk-webui-helper}"
# Library Catalog addon (menus/addon_library.sh): the Koha + Quick Add Docker
# stack is deployed here from this checkout's library/ directory. Root-owned
# on purpose - it holds the generated database/admin passwords in .env.
: "${LIBRARY_DIR:=/opt/kiosk-library}"
# Offline install bundle - only present on systems installed from an ISO
# built with `iso/build-iso.sh --offline`: a local apt repository (every
# package provisioning and the CUPS addon install) plus prebuilt