66

Software

obarun.org

66

Program to control the state of the system and service manager.

Interface

66 [ -h ] [ -z ] [ -v verbosity ] [ -T timeout ] [ -t tree ] start|stop|reload|restart|free|reconfigure|enable|disable|configure|status|log|resolve|state|runstate|remove|signal|emit|env|snapshot|wall|tree|parse|scandir|fdholder|internal|boot|poweroff|reboot|halt|suspend|hibernate|version [<command options> or subcommand <subcommand options>] service...|tree

Invocation of 66 can be made as root or regular account.

Options

These options are available for all commands except the -t option. In such cases, the help of the specific command provides clarification.

Commands

User command

Admin command

Debug command

Exit codes

Furthermore, all commands receive the same exit code.

A command that refuses changes nothing: nothing is parsed, written, enabled, started or stopped, and a command naming several services refuses all of them when one of them is refused. Two exceptions: with 66 enable -S, the activation stays when the start fails; and a refusal that needs the graph of the system, an invalid or a conflicting service met by the command, comes after the parse on the fly, so a service parsed by the command stays parsed, exactly as 66 parse would have left it.

Names

A name that has no frontend and that no service answers to is refused by every command:

service: <name> is unknown: no frontend and no service answers to the name -- is its provider enabled?

A name with a frontend that was never parsed is refused by every command that does not parse it:

service: <name> is not parsed -- parse it with 66 parse <name>

A name provided by a service through its Provide key answers for that service, except for remove, which takes a name literally. The suffix -log is reserved to the loggers 66 creates, and a service or tree name starting with a dot is refused.

Nothing under the directories of 66 is edited by hand. The repairs 66 offers are commands: 66 reconfigure -c, 66 parse -f, 66 remove, and for a tree 66 tree remove then 66 tree create.

Instanced service

An instanced service name from a service template can be passed as service argument where the name of the service must end with a @ (commercial at).—see frontend service file.

(!) The name of the template must be declared first immediately followed by the instance name.

For example, to enable an instanced service, you can do:

66 enable foo@foobar

Handling dependencies

Any dependency or required-by dependency of a service or a tree chain will be automatically resolved. Manually defining chains of interdependencies is unnecessary.

For instance, during the stop command, if the FooA service has a declared required-by dependency on FooB, FooB will be considered and automatically stopped first when FooA is stopped. This process will run recursively until all required-by dependencies are stopped. This is also valuable for the opposite process, meaning start.

This applies to all 66 commands when it’s necessary.

Bringing up (start, enable -S, signal -u/-U/-o) follows the dependencies of the service: what it needs comes up first. Bringing down, signaling and reloading (stop, free, the other operations of signal, reload) follows the required-by dependencies: what depends on the service is acted upon first. With -P, a command acts on the named services only, in the order of their dependencies, and never takes their dependencies, nor their logger, in charge. See dependencies for the graph and the services it refuses.