Offline addons, LAN-aware emergency hotspot, LAN time server
Offline bundle now carries every addon that works on a network without internet: LMS (Lyrion's own .deb, from the addon's LMS_DEB_URL) + Squeezelite, Asterisk Intercom (baresip), VNC, WireGuard and the Emergency Hotspot packages - each list in a variable next to the code that installs it (SQUEEZELITE_APT_PACKAGES, ASTERISK_INTERCOM_APT_PACKAGES, VNC_APT_PACKAGES, WIREGUARD_APT_PACKAGES, EMERGENCY_HOTSPOT_APT_PACKAGES), read by build-bundle.sh. Each install goes through run_with_offline_fallback like CUPS, so they install offline from the normal menus / Web UI. LMS installs as a bundle package when offline (lms_offline_install_wanted); its online repo/direct-download paths are unchanged. Tailscale/Netbird deliberately not bundled (vendor scripts, vendor servers). Bundle: 524 MB (+87 MB). Emergency hotspot: the boot check pinged only 8.8.8.8, so on a LAN with no internet the hotspot started on every boot. Now chosen at setup: "network" (default - router or internet must answer; a router that ignores ping still counts if it answered ARP), "internet" (old check), or "host" (a specific address). Three tries 10s apart. Existing scripts keep the old check until Reconfigure. New Core Settings -> Time Server (NTP) (menus/time_sync.sh): point systemd-timesyncd at LAN time server(s) via a timesyncd.conf.d drop-in, back to Ubuntu's defaults, or set the clock by hand (and the RTC) for a network with no time server. Complete Uninstall resets it. Also: lms_service_name used `systemctl list-unit-files | grep -q`, the same pipefail/SIGPIPE pattern as the earlier cups_is_installed bug; now `systemctl cat`. Tested in a network-less chroot of the 26.04.1 server filesystem: kiosk base, then action_wireguard_install and action_install_lms (real functions) and the Squeezelite/Intercom/VNC/hotspot package sets all installed from the bundle, apt left on normal sources after each. Hotspot script generated for all three modes (plus an invalid address, which falls back to "network") and its check run against simulated networks: LAN-only with router answering ping or only ARP -> no hotspot in "network" mode; nothing reachable -> hotspot. Time Server actions driven with timedatectl stubbed: drop-in contents, input validation, manual set-time sequence, reset removes the drop-in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cjz8a58eB5P9sUweqd3NHm
This commit is contained in:
@@ -107,19 +107,21 @@ iso/build-iso.sh --offline # also offers to install apt-utils, python3, gnupg,
|
||||
# -> iso/build/ubuntu-26.04.x-kiosk-offline-amd64.iso (~3.2 GB)
|
||||
```
|
||||
|
||||
This adds a ~420 MB bundle to the ISO:
|
||||
- Every Ubuntu package the kiosk install and the **CUPS printing addon**
|
||||
need (all printer drivers included), with their dependencies, as a local
|
||||
package repository.
|
||||
This adds a ~520 MB bundle to the ISO (~3.3 GB total):
|
||||
- Every Ubuntu package the kiosk install needs, plus the addons that make
|
||||
sense on a network without internet: **CUPS printing** (all printer
|
||||
drivers), **LMS (Lyrion) music server** and **Squeezelite** player,
|
||||
**Asterisk Intercom**, **VNC**, **WireGuard** and the **Emergency
|
||||
Hotspot** - with their dependencies, as a local package repository.
|
||||
- Node.js 22 (NodeSource).
|
||||
- Prebuilt Electron and Web UI modules.
|
||||
|
||||
On first boot it still installs online when there's internet. With none,
|
||||
it waits 90 seconds and then installs entirely from the bundle. The bundle
|
||||
stays on the kiosk at `/opt/kiosk-offline`, so **Addons → CUPS Printing**
|
||||
(in `./install.sh` or the Web UI) works with no internet too: when it can't
|
||||
reach the Ubuntu archive, it installs from the bundle by itself and then
|
||||
switches apt back to normal.
|
||||
stays on the kiosk at `/opt/kiosk-offline`, so those addons install from
|
||||
the normal menus (`./install.sh` or the Web UI) with no internet too: when
|
||||
an install can't reach the Ubuntu archive, it uses the bundle by itself and
|
||||
then switches apt back to normal.
|
||||
|
||||
Notes:
|
||||
- Build it on an **amd64** Ubuntu/Debian machine, or let the GitHub
|
||||
@@ -128,8 +130,12 @@ Notes:
|
||||
- Bundled versions are whatever was current when the ISO was built.
|
||||
Once the kiosk is online, normal updates and Advanced → Upgrade bring it
|
||||
current.
|
||||
- Addons that download their own software (LMS/Squeezelite, Tailscale,
|
||||
Netbird, Asterisk Intercom, VNC) still need internet.
|
||||
- Tailscale and Netbird aren't bundled: they install from their vendors'
|
||||
scripts and only work with their vendors' servers on the internet.
|
||||
- On a network with no internet, set **Core Settings → Time Server (NTP)**
|
||||
to a time server on your network (most routers can serve time), or set
|
||||
the clock by hand there - otherwise the clock slowly drifts, and lockout
|
||||
times, quiet hours and power schedules drift with it.
|
||||
- `sudo rm -rf /opt/kiosk-offline` frees the space if you don't need it.
|
||||
|
||||
**No Linux machine handy?** Build it on GitHub instead: **Actions → Build
|
||||
@@ -1105,6 +1111,12 @@ Automatically creates a WiFi access point when internet connectivity is lost.
|
||||
- Optional configuration with custom SSID and password
|
||||
- Can be deferred and configured later
|
||||
|
||||
**What counts as "cut off"** (chosen when you set it up; `./install.sh`
|
||||
version): by default, *the local network itself* is unreachable - neither
|
||||
the router nor the internet answers - so a kiosk on a network without
|
||||
internet doesn't start the hotspot on every boot. "No internet" (the old
|
||||
check) and "a specific address doesn't answer" are options too.
|
||||
|
||||
**How It Works:**
|
||||
1. Service monitors internet connectivity every 30 seconds
|
||||
2. When internet is lost, automatically:
|
||||
@@ -1477,6 +1489,9 @@ full migration pass.
|
||||
- **All-in-one install ISO** (`iso/build-iso.sh`, or Actions → Build kiosk ISO): Ubuntu Server 26.04 plus the kiosk in one USB stick — the Ubuntu install, then `install.sh` automatically on first boot. Interactive, unattended, or fully automatic. See "All-in-One Install ISO" above.
|
||||
- **Offline installs** (`--offline`): the ISO carries every package (including CUPS printing and all printer drivers), Node.js 22, and prebuilt Electron/Web UI modules, so a kiosk installs with no internet. With internet it still installs current versions online. Addons → CUPS Printing (menu or Web UI) installs from the bundle by itself when offline.
|
||||
- **Local files as sites:** an absolute path (`/home/kiosk/docs/menu.pdf`) shows a local page, PDF or image; a folder (`/home/kiosk/photos/`) plays as a full-screen **image slideshow** that picks up added/removed images within a minute. Works in both the Sites menu and the Web UI.
|
||||
- **Offline addons:** the `--offline` bundle now also carries LMS (Lyrion) + Squeezelite, Asterisk Intercom, VNC, WireGuard and the Emergency Hotspot; their normal installs use it automatically when there's no internet.
|
||||
- **Emergency Hotspot fix:** by default it now starts only when the local network is unreachable (router *and* internet), not merely when there's no internet - on a LAN without internet it used to start on every boot. Existing setups keep the old check until Advanced → Emergency Hotspot → Reconfigure.
|
||||
- **New: Core Settings → Time Server (NTP)** - use a time server on your network, go back to Ubuntu's, or set the clock by hand; for networks without internet.
|
||||
- **Word documents as sites:** a `.docx` path renders in the kiosk via docx-preview (~1 MB of JavaScript, bundled offline), updating when the file changes. Slideshow folders can mix `.docx` documents and PDFs (rendered with pdf.js) in with images.
|
||||
- **Electron upgrade:** v42.x → v44.x (42 leaves Electron's support window when 45 ships). Existing kiosks move to it via Advanced → Upgrade.
|
||||
- **Fix:** the CUPS menu could report an installed CUPS as "not installed" (`dpkg -l | grep -q` failing under `set -o pipefail`).
|
||||
|
||||
Reference in New Issue
Block a user