Commit Graph
4 Commits
Author SHA1 Message Date
Florian Schmidt 936abbef9d feat(deploy): install the update trigger units (#15)
shellbook-update.path starts the oneshot shellbook-update.service, which
runs the fixed root-owned updater and logs to /var/log/shellbook-update.log.
2026-11-16 15:31:01 +01:00
Florian Schmidt 54115289cc feat(deploy): bring new notebook templates into existing workspaces (#11)
Each shipped template is offered once (recorded in
/etc/shellbook/templates-offered) and copied as the service user only
when the file does not exist, so updates add new templates without
overwriting files or restoring deleted ones.
2026-11-16 11:42:13 +01:00
Florian Schmidt 399628bf16 feat(deploy): one-step install/update from the Proxmox host (#6)
bootstrap.sh runs on the Proxmox host via
  bash -c "$(curl -fsSL .../deploy/proxmox/bootstrap.sh)"
It unpacks the repository into a temporary directory, runs
create-ct.sh and removes everything again; create-ct.sh also removes
the installer files it pushed into the CT. Nothing stays on the host.

install.sh now installs or updates: an existing checkout is pulled
(fast-forward, SHELLBOOK_REF pins are kept), the service is restarted
and health-checked, and the summary prints the address, the one-time
setup token while setup is pending, the Claude login state and the
SSH public key.

It also installs a root-owned `shellbook-update` that downloads the
installer from the repository and reruns it. Root never executes
scripts from /opt/shellbook, which the service user and its terminal
panel can modify, so deploy/update.sh is removed.

Verified in a Debian 13 container: fresh install, then an update that
pulls a new commit while a tampered checkout script is not executed;
bootstrap.test.sh checks that host and CT keep no installer files.
2026-11-16 10:57:42 +01:00
Florian Schmidt 4fe7e4e376 fix(deploy): set PATH and keep Node files root-owned (#6)
pct exec runs with PATH=/sbin:/bin:/usr/sbin:/usr/bin, so install.sh failed
right after installing Node to /usr/local/bin ("node: command not found");
update.sh had the same gap for pnpm. Both scripts now set PATH explicitly.

tar ran as root kept the Node tarball's uid, and cp -a carried it into
/usr/local (bin directory and npm included), handing whichever CT user has
that uid write access to code root executes. Extract with --no-same-owner;
a rerun repairs an affected CT.
2026-11-16 09:45:53 +01:00