tools: register the updater in the normal command path (#24)

Use /usr/local/bin for container updater discovery and print an absolute command path for custom shells. Preserve managed links and operator files; cover shell lookup without sbin.

Closes #23
This commit was merged in pull request #24.
This commit is contained in:
2026-11-15 15:10:56 +01:00
parent 43caf1e412
commit f45e065994
8 changed files with 52 additions and 7 deletions
+14 -1
View File
@@ -56,6 +56,19 @@ CLI profiles and history. Official provider CLIs keep their own update/login lif
The updater is included in each binary release, so switching/rolling back releases updates it too.
Its root-executed code comes directly from the verified source archive; build-user modifications
to extracted source or build output cannot replace the installed updater.
The command is installed in `/usr/local/bin`; the updater also prints its absolute path for
shells with a custom PATH. Version 1.2.1 used `/usr/local/sbin`, which some container shells omit.
For that version you can invoke `/usr/local/sbin/finaltoken-update` directly, or add the normal
command without rebuilding:
```bash
mkdir -p /usr/local/bin
ln -s /opt/finaltoken/current/finaltoken-update /usr/local/bin/finaltoken-update
finaltoken-update --dry-run
```
This does not overwrite an existing file. Later updates preserve the matching managed link;
the old valid sbin link can remain for compatibility.
```bash
finaltoken-update --dry-run
@@ -141,7 +154,7 @@ credentials and runtime data independently of Git ignore rules, rejects symlinks
| `/etc/finaltoken/server.json`, `worker.json` | Operator account/profile configuration |
| `/etc/finaltoken/server.env`, `worker.env` | Root-only service environment and transport keys |
| `/opt/finaltoken/releases/`, `/opt/finaltoken/current` | Root-owned native releases and updater |
| `/usr/local/sbin/finaltoken-update` | Link to the active release's in-container updater |
| `/usr/local/bin/finaltoken-update` | Link to the active release's in-container updater |
| `/var/lib/finaltoken-server/`, `/var/lib/finaltoken-worker/` | Metadata, history and CLI-owned profiles |
| `/var/cache/finaltoken-build/` | Separate build user's cache; temporary source is removed |