66

Software

obarun.org

signal

Controls an already supervised service.

Interface

signal [ -h ] [ -wu | -wU | -wd | -wD | -wr | -wR ] [ -abqHkti12pcyodDuUxOrP ] [ -s signal ] service...

This command expects to find an already supervised service and an already running scandir.

This command is the heart of 66 concerning service state change. Every other 66 command that need to send a signal to a service pass through this command.

Multiple services can be handled by separating their names with a space.

This command handles interdependencies. The direction it takes depends on the operation asked for. The -u, -U and -o operations bring the service up, so they are propagated to its dependencies, which are brought up first. Every other operation is propagated to its required-by dependencies.

signal prepares nothing: a named service that was never parsed, or that is not supervised, is refused with 100, whatever the operation, -u included. A service met on the way that is not supervised is skipped, said at verbosity 2. A module one member of which was freed alone is refused with 100.

An event is sent only when the order acts on the service: a real change of state, or a signal delivered to its process. A -u or -o to a classic that runs, a -d to a service already down, a signal to a service that is down, send none. A signal delivered to a running service sends the event of that signal. A -o keeps a running classic up, and 66 runstate shows it up.

A named logger receives the signal with its service; under -P, the logger alone receives it.

Options

Usage examples

Send a SIGHUP signal to foo

66 signal -H foo

Send a SIGHUP signal to foo by signal name

66 signal -s SIGHUP foo

Triggers a log rotation of foo-log

66 signal -a -P foo-log

Take down foo and block until the process is down and the finish script has completed

66 signal -wD -d foo

Bring up foo and block until it has sent notification that it is ready. Exit if it is still not ready after 5 seconds.

66 -T 5000 signal -wU -u foo