66
www.obarun.org

The frontend service file

The s6 and s6-rc program handle and use different kind of services and files. If you have any idea of what we talk about you can find informations here for what we call on Obarun classic service and here for oneshot, longrun, bundle service. It can be complex to deal and understand the link between those files and kind of services. So the 66 frontend was born to allow you to deal with all this kind of services with one file.
By default the 66 tools expect to find services files at /etc/66/service but it can be changed at compile-time by giving the --with-service-path=DIR option to ./configure.

This file have a format of INI file with specific syntax on key field. The name of the file correspond generally at the name of the daemon and do not have any extension or prefix.

The file is splitted into section which contain a key value pair.

The name can contain character like '-', '_' and so on except the '@' character which is case reserve.

File name example

/etc/66/service/dhcpcd
/etc/66/service/very_long_name

File contain example

[main]
@type = classic
@name = dhcpcd
@description = "dhcpcd daemon"
@user = ( root )
@max-death = 3
@options = ( log )

[start]
@build = auto
@execute = ( /usr/bin/dhcpcd -B )

[logger]
@build = auto
@backup = 2 
@maxsize = 1000000
@timestamp = iso

[environment]
CONF=/etc/dhcpcd.conf

In the general way the parser will not accept any empty value. If a key is set, the value cannot be empty. Comment are allowed using the character #. Empty line are also allowed.

All key name are case reserve and cannot be employ to suit your needs. However the name of the key should be specific enough to avoid conflict with your needs.

Section can be declared in any order but a good practice is to declare the [main] section at the first place. In this way the parser will gain in time to treat the file.

Section

All sections need to be declared with the name set between '[]' bracket pair. The name of the section do not contain uppercase and may not contain any other character appart lowercase letter. An entire section can be commented placing the # at the beginning of section name like this:

#[stop]

The frontend file use these valid section name:

A section can be a mandatory one but not all the key field are necessarily mandatory.


Key field syntax legend

Divers syntax format is used to parse the value of a key.


Section: [main]

This section is mandatory.

Valid key name for the section


Section: [start]

This section is mandatory.

Valid key name for the section