Service
A service is defined using a systemd style service file. But finit doesn't support all the different options defined by systemd (about 850). It only supports this tiny subset and ignores the rest:
- requires: A list of units that must be present.
- wants: A list of units that will be started if found.
- before: A list unit this units that will not be started until this unit is started.
- after: A list of units that must be started prior to this unit.
- defaultdependencies: By default all units will by default run after the targets sysinit and basic. Any unit that needs to run before must set this option to no.
- type: Type of service (see below).
- execstart: What will be executed to start this unit.
- pidfile: A path to where the daemon will write it's PID.
There are basically three types of servises:
- Child: The service will run as a child to finit. The only way for finit to delay until the service is ready is if it uses the systemd notification protocol. Otherwise finit will assume it's immediately ready.
- Daemon: The service will run independently by forking then it's ready. For finit to be able to keep track of it, a path to a PID file must be provided.
- Oneshot: The service only executes something to get ready. Nothing remains running.
The types defined by systemd are these:
- simple: This is mapped to child.
- forking: This is the same as daemon.
- oneshot: Same as above.
- dbus: This is like child but notification goes through D-BUS. This is not supported by finit.
- notify: This is child with notification using the systemd protocol.
- notify-reload: This is identical to notify but it also implies that the service could be reloaded using SIGHUP. (Note that there is no forking-reload for some reason.)
- idle: This is mapped to child.
- exec: This is mapped to child.

