Update ShellBook from the web UI #15

Closed
opened 2026-11-16 15:23:19 +01:00 by schmidt.florian · 1 comment
Owner

Updating needs shellbook-update as root in the CT. Add a Settings button that starts it.

  • The service stays unprivileged (NoNewPrivileges). The installer adds root-owned systemd units: a path unit watching a request file in the data directory starts a oneshot service that runs /usr/local/sbin/shellbook-update; output goes to a root-owned log file.
  • Settings shows the installed commit, checks the repository for new commits (with their subjects), starts the update after confirmation, follows the log, survives the service restart and offers a reload.
  • Without the units (dev, older installs) the UI explains how to update.
Updating needs `shellbook-update` as root in the CT. Add a Settings button that starts it. - The service stays unprivileged (NoNewPrivileges). The installer adds root-owned systemd units: a path unit watching a request file in the data directory starts a oneshot service that runs /usr/local/sbin/shellbook-update; output goes to a root-owned log file. - Settings shows the installed commit, checks the repository for new commits (with their subjects), starts the update after confirmation, follows the log, survives the service restart and offers a reload. - Without the units (dev, older installs) the UI explains how to update.
Author
Owner

Done in 2fc5f99..cae72c7.

  • Settings → Updates: installed commit, "Check for updates" (lists new commits), "Update now" with confirmation, live output, follows the service restart, then offers Reload.
  • The service stays unprivileged: it only writes /var/lib/shellbook/update-request. Root-owned shellbook-update.path starts oneshot shellbook-update.service → /usr/local/sbin/shellbook-update; output in /var/log/shellbook-update.log.
  • Without the units, Settings explains the manual shellbook-update run instead.

Verified: typecheck, tests (core 70, web 80, server 200 + 1 skipped), build, 17 install-script checks.
Not verified: the systemd path trigger, systemctl show --timestamp=unix parsing and the restart on a real Debian 13 host, and the panel in a real browser. Existing installs need one pct exec 501 -- /usr/local/sbin/shellbook-update to get the units.

Done in 2fc5f99..cae72c7. - Settings → Updates: installed commit, "Check for updates" (lists new commits), "Update now" with confirmation, live output, follows the service restart, then offers Reload. - The service stays unprivileged: it only writes `/var/lib/shellbook/update-request`. Root-owned `shellbook-update.path` starts oneshot `shellbook-update.service` → `/usr/local/sbin/shellbook-update`; output in `/var/log/shellbook-update.log`. - Without the units, Settings explains the manual `shellbook-update` run instead. Verified: typecheck, tests (core 70, web 80, server 200 + 1 skipped), build, 17 install-script checks. Not verified: the systemd path trigger, `systemctl show --timestamp=unix` parsing and the restart on a real Debian 13 host, and the panel in a real browser. Existing installs need one `pct exec 501 -- /usr/local/sbin/shellbook-update` to get the units.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FinalFactory/ShellBook#15