66

Software

obarun.org

reconfigure

This command brings down, unsupervises, parses again and brings up the service.

Interface

reconfigure [ -h ] [ -P ] [ -c ] service...

This command is a convenient way to execute the stop, free, parse, and start commands simultaneously. It’s used when you modify a service’s frontend file and want to apply the modifications.

If the service is running, it is stopped and then unsupervised. Afterward, the service is parsed again and restarted. If the service isn’t running, only the parse process is executed.

The service is put back in the state the command found it in: running or not, supervised or not, enabled or not, in its tree. A reactor found armed is armed again. A service never parsed is simply parsed.

Every named frontend is checked before anything is stopped: a frontend the parse refuses stops nothing and writes nothing. The check runs no script of the service, except the configure script of a module, which is part of the parse of the module and writes in a temporary copy only; a configure script that fails makes the command exit with 111, nothing written. The frontends are checked once more just before the write: when another command wrote meanwhile and the check now refuses, nothing is written, the services the command took out of the supervision are put back in the state it found them in, and the command exits with 100.

If a service fails to stop, the command exits with 111 and writes nothing: what it took out of the supervision is put back in the state it found it in.

For module service types, the same process is applied to all services within the module. A service inside a module cannot be reconfigured alone: name the module instead. If the module is part of a tree associated with the boot group, only the parse process is executed to avoid interrupting the boot sequence. The changes will be applied during the next reboot.

A logger is reconfigured with its service: 66 reconfigure foo-log is refused, 66 reconfigure foo handles both.

Multiple services can be reconfigured by separating their names with a space. Only the named services are parsed again, not the services that depend on them.

This command handles interdependencies for the stop, free and start process. The stop and free part is propagated to the services that depend on the selection, the start part to the services it depends on.

Options

Usage examples

Reconfigures the foo service

66 reconfigure foo

Reconfigures the foo@bar module service

66 reconfigure foo@bar

Repairs the foo service whose resolve file does not read

66 reconfigure -c foo