Add Fleet Profile MVP for replicating settings across kiosks; bump to v2.13.0

New menus/fleet_profile.sh (Advanced), for the "set up one kiosk, then
stand up a dozen more like it" use case. Not a port of the legacy
Export/Import Settings - a narrower, deliberately-scoped feature:

- Export: writes config.json's portable fields (sites, display/touch/
  navigation, lockout, password protection) plus a list of addons
  present at export time to a JSON profile file.
- Apply: merges those fields onto a target kiosk's config.json (same
  merge-not-replace pattern as save_config, so the target's own fields
  survive untouched) and prints a checklist of which listed addons are/
  aren't installed on the target.

Deliberately excludes machine-bound credentials rather than silently
mishandling them: Authelia's encrypted password is keyed off
/etc/machine-id and decrypts to garbage elsewhere; a WireGuard private
key is a device identity, reusing one across machines is a peer
conflict; most Asterisk PBXes reject duplicate registrations to the
same extension. Apply prints all three as an explicit "needs a human"
checklist. Non-interactive addon installation (for a fully scriptable
fleet rollout) is a deliberate follow-up, not part of this MVP.

Full command-level stubbed test suite covering export (site/setting
content, Authelia stripped, addon detection) and apply (merge
correctness, target's own Authelia preserved, bad path/invalid JSON
handled cleanly). Full 20-suite regression + real end-to-end menu
navigation via install.sh all pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VfsFSoRqfbRG7XAg5RoE7e
This commit is contained in:
Claude
2026-08-19 03:45:36 +00:00
parent b0b558f015
commit 5d56c667da
4 changed files with 314 additions and 13 deletions
+26 -2
View File
@@ -1,8 +1,32 @@
#!/bin/bash
################################################################################
### Ubuntu Based Kiosk v2.12.0 ###
### Ubuntu Based Kiosk v2.13.0 ###
################################################################################
#
# RELEASE v2.13.0 - Fleet Profile: New MVP for Standing Up Several
# Kiosks with the Same Settings
# - New in ./install.sh's Advanced menu: Fleet Profile
# (menus/fleet_profile.sh). Not a port of the legacy Export/Import
# Settings - a narrower, deliberately-scoped feature for the "set up
# one kiosk, then stamp out a dozen more like it" use case: export the
# portable parts of config.json (sites, display/touch/navigation,
# lockout, password protection) to a JSON file, apply that file to any
# other already-installed kiosk.
# - Explicitly does NOT copy machine-bound credentials, because copying
# them would be actively wrong, not just incomplete: Authelia's
# encrypted password is keyed off /etc/machine-id and decrypts to
# garbage elsewhere; a WireGuard private key is a device identity and
# reusing one across machines is a peer conflict; most Asterisk PBXes
# reject two simultaneous registrations to the same extension. Apply
# prints these as an explicit "needs a human" checklist instead of
# silently skipping them or (worse) cloning them.
# - Does not install missing addons - only records which addons were
# present at export time and reports which of those are/aren't
# present on the machine being applied to. Non-interactive addon
# installation (so applying a profile needs zero prompts, scriptable
# over SSH to a whole fleet) is deliberately left as a follow-up, not
# bundled into this MVP.
#
# RELEASE v2.12.0 - Complete Uninstall Migrated (Last of the
# "Destructive Trio"); Composed, Not Re-Implemented
# - New in ./install.sh's Core Settings menu: Complete Uninstall
@@ -450,7 +474,7 @@ set -euo pipefail
### SECTION 1: CONSTANTS & GLOBALS
################################################################################
SCRIPT_VERSION="2.12.0"
SCRIPT_VERSION="2.13.0"
# Resolve the real path to this script file.
# When piped (curl|bash or wget|bash), BASH_SOURCE[0] is a pipe descriptor,