Archived
feat: detached systemd restart + runnable Updates panel commands
Run Linux restart commands inside a detached transient systemd user service (systemd-run --user) so the restart survives the launching terminal being killed and its logs can be inspected via journalctl. Make the Updates panel actionable: every command has Copy and Run, a single recommended all-in-one command is shown at the top, and the rest are grouped as optional additional commands.
This commit is contained in:
@@ -71,10 +71,10 @@ describe("PI WEB status", () => {
|
||||
|
||||
const status = await getPiWebStatus(daemon);
|
||||
|
||||
expect(status.commands.restart).toBe("systemctl --user restart pi-web-ui-dev.service pi-web-sessiond.service");
|
||||
expect(status.commands.restartWeb).toBe("systemctl --user restart pi-web-ui-dev.service");
|
||||
expect(status.commands.restartSessiond).toBe("systemctl --user restart pi-web-sessiond.service");
|
||||
expect(status.messages.find((message) => message.id === "sessiond-stale")?.command).toBe("systemctl --user restart pi-web-sessiond.service");
|
||||
expect(status.commands.restart).toBe("systemd-run --user --collect --unit=pi-web-restart -- systemctl --user restart pi-web-ui-dev.service pi-web-sessiond.service");
|
||||
expect(status.commands.restartWeb).toBe("systemd-run --user --collect --unit=pi-web-restart-web -- systemctl --user restart pi-web-ui-dev.service");
|
||||
expect(status.commands.restartSessiond).toBe("systemd-run --user --collect --unit=pi-web-restart-sessiond -- systemctl --user restart pi-web-sessiond.service");
|
||||
expect(status.messages.find((message) => message.id === "sessiond-stale")?.command).toBe("systemd-run --user --collect --unit=pi-web-restart-sessiond -- systemctl --user restart pi-web-sessiond.service");
|
||||
} finally {
|
||||
await rm(home, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user