You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(daemon): detect system-scope systemd gateway units on Linux (#87577)
Teach the Linux gateway daemon to recognize system-scope systemd units in
addition to user-scope: the canonical user path, the canonical system path,
and any non-canonically named system unit carrying the OpenClaw gateway
marker (the reporter's /etc/systemd/system/openclaw.service shape). status,
is-enabled, restart, and stop now route through the detected scope and unit
name, querying the system manager (no --user) for system units.
For a detected system-scope unit, root callers run systemctl <action>
directly via the canonical service action; non-root callers fail closed with
sudo systemctl guidance naming the real unit instead of signaling a
supervisor-owned process. The unmanaged lifecycle fallback now delegates
system-scope units to that same canonical path (root -> systemctl, non-root
-> sudo guidance) rather than throwing unconditionally, so both code paths
share one policy and one hint string and a root operator is never told to
sudo a command it can already run.
Adds regression coverage for detection, routing, and both root/non-root
operator paths in the lifecycle fallback.
"openclaw-gateway.service is a system-scope unit (/etc/systemd/system/openclaw-gateway.service); run `sudo systemctl stop openclaw-gateway.service` to stop it",
0 commit comments