fix(status): show "externally managed" instead of "not installed" when gateway is reachable#27291
Conversation
…n gateway is reachable When the OpenClaw gateway is started by a user-managed service (e.g. a hand-written systemd system unit at /etc/systemd/system/openclaw-gateway.service or a container supervisor), openclaw status and the status-all table both reported "systemd not installed" because the OpenClaw-managed user-level unit was absent. The fix: before emitting the "not installed" string, check whether the gateway is actually reachable (gatewayReachable). If it is, the process is clearly running — just not via the OpenClaw install/uninstall path. In that case, display "<label> · running (externally managed)" so the user gets an accurate picture without being prompted to install a service that is already running. Affected surfaces: - `openclaw status` table (status.command.ts) - `openclaw status --all` table (status-all.ts) Fixes openclaw#27267
Greptile SummaryThis PR fixes misleading status output when the gateway is running via external service management (e.g., user-created systemd units or container supervisors). Previously, both The fix adds a Key changes:
The implementation is consistent across both files and preserves existing behavior for all other scenarios (gateway managed by OpenClaw, gateway not running, etc.). Confidence Score: 5/5
Last reviewed commit: fe84196 |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing this PR because the author has more than 10 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit. |
Problem
openclaw statusandopenclaw status --allboth report "systemd not installed" when the gateway is started by a user-managed service (e.g./etc/systemd/system/openclaw-gateway.serviceor a container supervisor), even though the gateway is healthy and processing messages.Root cause:
service.isLoaded()andservice.readCommand()only look for the OpenClaw-managed user-level systemd unit (~/.config/systemd/user/openclaw-gateway.service). When the unit is absent,daemon.installed === falseunconditionally →"systemd not installed".Fix
Before emitting the
"not installed"string, checkgatewayReachable. If the gateway responds to the probe it is clearly running — just not via the OpenClaw install/uninstall path. In that case display:No change when the gateway is unreachable: the existing
"systemd not installed"hint still appears to guide the user towardopenclaw gateway install.Changed files
src/commands/status.command.tsgatewayReachableguard indaemonValueIIFEsrc/commands/status-all.ts"Gateway service"rowBefore / After
openclaw gateway startsystemd installed · runningsystemd not installedsystemd · running (externally managed)systemd not installedFixes #27267