Metadata-Version: 2.4
Name: bazaar-contrib-system-service
Version: 0.3.0rc1
Summary: System service management for Bazaar Compute Node
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Dist: bazaar-core~=0.3.0rc13
Requires-Dist: bazaar-contrib-config~=0.3.0rc13
Requires-Dist: bazaar-contrib-invoke~=0.3.0rc13
Requires-Dist: bazaar-contrib-sidecar~=0.3.0rc13
Requires-Dist: bazaar-contrib-status~=0.3.0rc13
Requires-Dist: bazaar-contrib-timer~=0.3.0rc13
Requires-Dist: click>=8.1.0
Requires-Dist: jinja2>=3.1.0
Requires-Python: >=3.15
Project-URL: Repository, https://github.com/open-bazaar/contrib-system-service
Description-Content-Type: text/markdown

# bazaar-contrib-system-service

User-level host service management for
[Bazaar Compute Node](https://github.com/yuchanns/bazaar-compute-node): a systemd
user unit on Linux, a launchd agent on macOS and a scheduled task on Windows.

## Setup

Add the plugin to a node, register the node to start at login, then start it:

```sh
bcn contrib add system-service --enable
bcn system-service install
bcn system-service start
```

The service runs the node with the configuration the install command used. It
reads its environment from `~/.config/bcn/runtime.env`, or `runtime.ps1` on
Windows, when that file exists; `install --env-file PATH` selects another.

## Commands

- `bcn system-service install [--env-file PATH] [--force]`: register the
  service and start it at the next login. It refuses to overwrite service
  files, or on Windows a scheduled task, that bcn did not create; `--force`
  replaces them.
- `bcn system-service start` / `restart`: start the node through the native
  service manager and wait until it is ready.
- `bcn system-service stop`: stop the service.
- `bcn system-service status`: report registration, activity and the node's
  health.
- `bcn system-service uninstall`: remove the service and its managed files.

`bcn start`, `bcn stop` and `bcn restart` forward to these commands.
