Commands
stop
Stop services for a project, service, or the entire supervisor.
$ sysg stop
Options
| Short | Long | Description |
|---|---|---|
-c | --config | Path to the configuration file. When a supervisor is running, systemg uses it to resolve the target project. Without a supervisor, systemg uses it to locate persisted service state |
-s | --service | Name of a specific service to stop. If not specified, all services are stopped |
-p | --project | Target a stable project id when stopping services |
- | --supervisor | Shut down the resident supervisor and all registered projects |
-v | --verbose | Print per-service operation progress |
- | --sys | Opt into privileged system mode. Requires running as root |
- | --drop-privileges | Accepted globally but ignored; stop does not spawn services |
- | --plain | Disable terminal decoration for automation |
- | --log-level | Set logging verbosity for this invocation. Accepts named levels (trace, debug, info, warn, error, off) or numeric values (5-0) |
Examples
Stop the current project
$ sysg stop
By default, stop is project-scoped. It resolves the current config context
and stops the services for that project.
Stop a project from a config
$ sysg stop --config ./systemg.yaml
Stop a registered project
$ sysg stop --project arbitration
Stop a specific service
$ sysg stop --service api
Leaves other services running.
For multi-project supervisors, combine project and service selectors:
$ sysg stop --project arbitration --service api
Shut down the supervisor
$ sysg stop --supervisor
This stops every registered project and exits the resident supervisor. After
this, plain sysg status reports No running supervisor.
What happens
- Services stop in reverse dependency order
- Each service receives
SIGTERM— the whole tree, not just the named process - After a short grace period (about 1 second),
SIGKILLis sent if needed - The supervisor remains available unless you used
--supervisor
Info
Descendants are included. Every service leads its own session, so a stop
sweeps the union of the service's descendants, its process group and its
session — a forked shell, a browser's renderers, a worker pool. A stop reports
success only when nothing from the unit is left alive. Dynamically spawned
children are reclaimed too, subject to their
termination_policy.
Process trees has the full mechanism.
When stopping a single service manually, its dependents keep running — an operator stopping one unit is a decision, not a failure. A dependency that crashes or fails its health check does stop its dependents; once it is healthy again the supervisor starts the eligible ones back up. See dependency failure.
Reloading a manifest after stop
Stopping a project does not freeze its old unit definitions. Running
sysg stop --project <id> followed by sysg start --config <file> reloads the
project from the supplied config, so manifest changes (added or removed
services, changed commands) are applied on the next start. To reload in place
without a stop, use restart --project <id>,
which reuses the project's stored config path.
See also
- Process trees - What teardown reaches
start- Launch servicesrestart- Restart services