RBULK-WATCHD(1)

NAME
rbulk-watchd - execute scripts upon receipt of notifications

SYNOPSIS
rbulk-watchd [-h]
rbulk-watchd [-c file] [-l user] [-g group] [-t | -u] [-f]

DESCRIPTION

rbulk-watchd opens tcp and/or udp sockets and listen for incoming connections. By default, sockets are bound on all interfaces on port 8869. This can be changed with the bind configuration directive (see CONFIGURATION FILE) and the -p command line option.

When rbulk-watchd receives a message, the connection is validated against a list of allow directives declared in the configuration file. A command is then executed according to the message content. The list of commands that can be executed is specified via the trigger configuration directive.

Sending SIGHUP to a running rbulk-watchd will reload the configuration file. If an invalid parameter is found in the configuration file upon the reload, the process will exit.

The following command line options are available:

-h  Print usage summary and exit.

-c file
    Parse configuration from file instead of the default.

-p port
    Listen for connections on port port instead of the default.

-l user
    Run as the user user. Only programs initially run as root will be able to switch to a different user.

-g group
    Switch to group. See also -l.

-t | -u
    Create and listen only to tcp (-t) or udp (-u) connections. By default, both tcp and udp sockets are created.

-f  Run in the foreground and do not detach from the controlling terminal. Diagnostic messages are printed on stderr instead of syslog(3).

CONFIGURATION FILE
rbulk-watchd looks for the rbulk-watchd.conf configuration file in /opt/openrobots/etc by default, or in the file specified with the -c command line option.

The configuration file is a text file with one directive per line. Empty lines are ignored and the # character define comments that extend up to the end of the line. A \ character at the end of the line marks a continuation line. The following directives are understood:

bind addr
    Controls which addresses are listened to. The default is to bind to any IPv4 or IPv6 address. addr can be a numeric address or a host name.

allow addr
    Allows connections from addr. Numeric addresses or host names (FQDN) are recognized. Wildcards, if present, are interpreted with fnmatch(3) (q. v.). Connections not explicitly allowed are denied.

trigger key command ...
    Configure command to run upon reception of the key notification. key must contain only characters from the [A-Za-z0-9_/-] range or wildcards (*, ? or [) that are matched with fnmatch(3). Commands may contain several words and extend up to the end of line. Litteral `%s' sequences in the command are replaced by the key. The command is then passed as-is to sh(1) using the -c flag; interpretation, if any, is performed by the shell.

FILES

/opt/openrobots/etc/rbulk-watchd.conf

SEE ALSO
rbulk-notify(1), inetd(8).