4 Services

The service is obviously a very important concept of the Shepherd. On the Guile level, a service is represented as a record of type <service>. Each service has a number of properties that you specify when you create it: how to start it, how to stop it, whether to respawn it when it stops prematurely, and so on. At run time, each service has associated state: whether it is running or stopped, what PID or other value is associated with it, and so on.

This section explains how to define services and how to query their configuration and state using the Shepherd’s programming interfaces.

Note: The programming interface defined in this section may only be used within a shepherd process. Examples where you may use it include:

These procedures may not be used in Guile processes other than shepherd itself.