This command starts one ore more services defined in tree.
66-start [ -h ] [ -z ] [ -v verbosity ] [ -l live ] [ -t tree ] [ -T timeout ] [ -r | R ] service(s)
This tool expects to find an already enabled service inside the given tree and an already running scandir. If the state of the service is already up, 66-start does nothing except when passing the -r or -R option—see reload transition.
Multiple services can be started by seperating their names with a space.
-h : prints this help.
-z : use color.
-v verbosity : increases/decreases the verbosity of the command.
-l live : changes the supervision directory of service to live. By default this will be /run/66
. The default can also be changed at compile time by passing the --livedir=live
option to ./configure
. An existing absolute path is expected and should be within a writable and executable filesystem - likely a RAM filesystem—see 66-scandir.
-t : handles the selection of the given tree. This option is mandatory except if a tree was marked as 'current'—see 66-tree.
-T timeout : specifies a timeout (in milliseconds) after which 66-start will exit 111
with an error message if the service still hasn't reached the up state. By default, the timeout is 1000
.
-r : If the service is up, restart it, by sending it a signal to kill it and letting s6-supervise start it again. By default, the signal is a SIGTERM
; this can be configured via the @down-signal
field in the frontend service file.
In case of bundle
, atomic
or module
services, any dependency chain will be resolved automatically. It is unnecessary to manually define chained sets of dependencies. If FooA has a declared dependency on FooB, FooB will be automatically considered and started first when starting FooA. This will run recursively until all dependencies are started.
66-start gathers the classic service(s) passed as argument in a list called selection.
The command first inspects this list to determine if any service in question was already written to it. If it was not then a new entry is added for each service passed as argument. It then copies the necessary files and directories of each newly written entry, creates a down file and the event fifo directory. After that it subscribes to the services fifo events, sends a reload signal to the scandir and waits for an event for every service in the selection. If a timeout occurs before receiving an event, the initialization fails.
If a reload was forced the command will use a reload transition instead.
The selection is then inspected again and searched for any logger that needs to be associated with the passed service. If any such instruction was found the corresponding logger service will be added to the selection as well.
Finally the command sends a 66-svctl -v verbosity -T timeout -l live -t tree -U selection
and waits for the resulting exit code.
If any one of these processes fails then as a result 66-start fails too and exits with code 111
.
66-start gathers the bundle
, atomic
and module
service(s) passed as argument in a list called selection.
The command first inspects this list to determine if any service database in question of the given tree was already written to it. If it was not then a 66-init -v verbosity -l live -d tree
is automatically invoked and 66-start will wait for the exit code of this automatic command. After that a reload signal is sent to the scandir to inform it about the change.
If a reload was forced the command will use a reload transition instead.
Finally the command sends a 66-dbctl -v verbosity -T timeout -l live -t tree -u selection
and waits for the resulting exit code.
If any one of these processes fails then as a result 66-start fails too and exits with code 111
.
66-start gathers the classic service(s) passed as argument in a list called selection.
If the service(s) require(s) a logger it will also be added to the selection. The command then sends a 66-svctl -v verbosity -T timeout -l live -t tree -D selection
and waits for the corresponding exit code. It removes all files and directories of the service(s) from the scandir and continues with an init transition—see above.
If this process fails then as a result 66-start fails too and exits with code 111
.
66-start gathers the bundle and/or atomic service(s) passed as argument in a list called selection.
The command first makes a backup of the services database live within the given tree and switches to the backup with the help of s6-rc-update.
It then compiles the services database of the given tree from source with the help of s6-rc-compile.
Next it switches from the services database live of the given tree to this newly compiled database after which it then sends a 66-dbctl -v verbosity -T timeout -l live -t tree -d selection
.
Finally it performs a 66-dbctl -v verbosity -T timeout -l live -t tree -u selection
and waits for the corresponding exit code.
If any one of these processes fails then as a result 66-start fails too and exits with code 111
.