S6-FRONTEND(8)

NAME
s6-frontend - the program that does the real command dispatching behind the s6 command line

SYNOPSIS
s6-frontend [global_options...] command subcommand [subcommand_options...] [args...]

DESCRIPTION
s6-frontend is the program that does the real command dispatching behind the s6(8) command line. It is not meant to be called directly; users should call s6(8) instead.

  Detailed operation
What really happens when you call ‘s6 args...’ is the following:

•   s6(8) gets the name of its configuration file from the S6_FRONTEND_CONF environment variable, or from the compiled-in default if this variable is unset. Normally this default is /etc/s6-frontend.conf.

•   This configuration file (let's call it conf) contains variable definitions (cf. s6-frontend.conf(5)) that set the default for all the parts of the s6 system.

•   s6(8) rewrites itself into ‘envfile -I conf -- s6-frontend args...’

•   The envfile(1) program reads and parses conf, and then runs s6-frontend with the additional environment variables defined in conf.

•   s6-frontend sets its defaults according to these environment variables, then performs the work described in the documents linked from the s6(8) page.

The separation between s6(8) and s6-frontend is really just a trick to avoid writing an additional parser for the s6-frontend.conf(5) configuration file. Using envfile(1) to read the configuration was a natural fit because the execline[1] set of tools is used by s6-frontend to build complex command lines.

That is why usage messages given by the various ‘s6 foobar help’ commands print ‘Usage: s6 foobar subcommand...’ but error messages, if they happen, print ‘s6-frontend: fatal: error condition’, because the program where the error occurred is s6-frontend, not s6.

Note that most error messages will print the name of another command, somewhere in the s6 ecosystem. That is a command invoked by s6-frontend to perform the task required by the user; and if it fails, its own error message will be more informative than whatever wrapping s6-frontend could do. This might be a little confusing at first, but a design decision was made that it was a better trade-off to provide accurate error messages at the expense of a little predictability in the name of the program that prepends the error messages.

In summary:

•   s6(8) is what the user types

•   s6-frontend is what interprets the user's command into orders to give to various parts of the s6 ecosystem

•   Various programs from the s6 supervision suite[2] or the s6-rc service manager[3], invoked by s6-frontend, perform the work. When they succeed it is transparent; when they fail they prepend the error message with their name.

SEE ALSO
envfile(1), s6-frontend.conf(5), s6-frontend-overview(7), s6(8)

[1] https//skarnet.org/software/execline/

[2] https://skarnet.org/software/s6/

[3] https://skarnet.org/software/s6-rc/

This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-frontend/s6-frontend.html

AUTHORS
Laurent Bercot Lennart Jablonka <humm@ljabl.com> (man page port)