Skip to main content

stop

Stop services for a project, service, or the entire supervisor.
$ sysg stop

Options

ShortLongDescription
-c--configPath 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--serviceName of a specific service to stop. If not specified, all services are stopped
-p--projectTarget a stable project id when stopping services
---supervisorShut down the resident supervisor and all registered projects
---sysOpt into privileged system mode. Requires running as root
---log-levelSet 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

  1. Services stop in reverse dependency order
  2. Each service receives SIGTERM
  3. After 10 seconds, SIGKILL is sent if needed
  4. The supervisor remains available unless you used --supervisor
When stopping a single service, its dependents keep running. Only crashes trigger cascading stops.

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