Node/Service
The systemd services of the host
List the services of the host
Lists each service that systemd has loaded, with its state, whether it starts at boot and its description, through gohai. A Mac has no systemd, and reports skipped.
Deploy a service
Gets the object from the object store and writes it as the unit file of the service, such as /etc/systemd/system/osapi-app.service for app, then reloads systemd. A unit file at that path that osapi did not write, such as the agent's own osapi-agent.service, is refused. A unit file that already has the content does not change. The service does not start: start and enable are their own actions.
Remove a service that osapi deployed
Stops and disables the service, removes its unit file and reloads systemd. A service with no unit file does not change.
Get one service
Reads one service from the same list, by its name with .service or without it. A service that systemd has not loaded is not found.
Deploy a new unit file for a service
Writes the object as the unit file of a service that osapi deployed, then reloads systemd when the file changed. A service that osapi did not deploy is not found.
Make a service that osapi deployed not start at boot
Disables the service. A service that is not enabled does not change. A service that osapi did not deploy is not found.
Make a service that osapi deployed start at boot
Enables the service. A service that is enabled does not change, and nor does a unit with no [Install] section, which systemd calls static: it cannot start at boot. A service that osapi did not deploy is not found.
Restart a service that osapi deployed
Restarts the service. It always changes the host. A service that osapi did not deploy is not found.
Start a service that osapi deployed
Starts the service. A service that runs does not change. A service that osapi did not deploy is not found.
Stop a service that osapi deployed
Stops the service. A service that does not run does not change. A service that osapi did not deploy is not found.