Commit d2d463c
fix(service_manager): systemd unit Restart=on-failure → always
After `gateway_auto_update::tick` completes a binary swap it calls
`std::process::exit(0)` to hand off to the supervisor (per the doc at
gateway_auto_update.rs:18 — "the OS supervisor … systemd Restart=always
— relaunches us on the new binary"). The systemd unit template shipped
`Restart=on-failure`, which systemd treats as success-and-stop for an
exit-code-0 process. So after every gateway self-update on Linux,
systemd correctly noticed the process exited cleanly and refused to
restart it — silently turning auto-update into "the gateway uninstalls
itself".
macOS launchd defaults to `KeepAlive=true` so the symmetric bug was
Linux-only. 0.1.25 was published briefly with this defect and pulled
once it was caught; this rolls forward into 0.1.26.
Added a unit test asserting the rendered unit contains `Restart=always`
and does not contain `Restart=on-failure`, so this can't silently
regress in a future template tweak.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 1eab39d commit d2d463c
4 files changed
Lines changed: 20 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
| |||
0 commit comments