Download this file
| 1 | # Member-requested process restarts (issue #113) — carlos-adopt.path's twin |
| 2 | # for the third half the sandboxed agent cannot do itself. The agent's |
| 3 | # serial poll sees the console's bump within ~2s, compares the app's restart |
| 4 | # generation, and bounces its OWN exec children immediately — but it cannot |
| 5 | # restart a systemd unit: not a carlos-app@ tenant, and not the bespoke unit an |
| 6 | # addr-backed route names (issue #110's consoles). Touching |
| 7 | # /data/restart-requested relays that to a root pass. |
| 8 | # |
| 9 | # It starts carlos-restart.service — `carlos adopt -restart-only` — |
| 10 | # deliberately NOT carlos-adopt.service or carlos-config-sync.service. A |
| 11 | # restart request changes no version and writes no config, so a full pass would |
| 12 | # stage releases and nag about canaries on a per-request trigger, and the |
| 13 | # config pass would find no changed env file and cycle nothing at all. Same |
| 14 | # split, and the same reason, as carlos-stage.path having its own service. |
| 15 | # |
| 16 | # /data is hardcoded like every path in these unit files — a box with a |
| 17 | # nonstandard data dir simply never fast-triggers and keeps the hourly floor |
| 18 | # (carlos-adopt.timer runs the same comparison). |
| 19 | [Unit] |
| 20 | Description=CARLOS instance restart on agent request (carlos restart) |
| 21 | |
| 22 | [Path] |
| 23 | PathChanged=/data/restart-requested |
| 24 | Unit=carlos-restart.service |
| 25 | |
| 26 | [Install] |
| 27 | WantedBy=multi-user.target |
| 28 | |