Commit ee83963
committed
feat(fw): self-upgrade from GitHub releases (endpoint + dashboard button)
- upgrade.rs: query the GitHub releases API (reqwest/rustls), semver compare,
download + .deb magic-byte validation, install_and_restart via
'systemd-run --collect' (detached transient unit so the install survives the
service restart).
- GET /api/v1/upgrade (cached: current/latest/available/deb_url) + POST
/api/v1/upgrade (download+install+restart, 202). Daemon checks at startup +
every 6h; api.github-repo config (default LNVPS/api).
- dashboard: green upgrade button in the header when a newer release exists;
confirm dialog then POST.
- is_newer unit test + live_latest_release ignored network test.
New dep: reqwest (rustls-tls, json). 9 api + full unit suite green; clippy/fmt
clean. Note: needs a vX.Y.Z release to have something to upgrade to.1 parent a0b2d4b commit ee83963
12 files changed
Lines changed: 929 additions & 6 deletions
File tree
- docs/agents
- lnvps_fw
- lnvps_fw_service
- examples
- src
- tests
- work
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
37 | 50 | | |
38 | 51 | | |
39 | 52 | | |
| |||
0 commit comments