respond man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

RESPOND(1)		  BSD General Commands Manual		    RESPOND(1)

Jouke Witteveen

NAME
     respond — automate response actions for events that are reported by a
     logging system (such as syslog).

SYNOPSIS
     respond -a FILE [-p FILE]

DESCRIPTION
     respond listens on	 stdin or on the named pipe specified by -p and
     matches each line it reads to the regular expressions it finds in the
     actionscript specified by -a.  If a line matches, respond executes a
     rewritten command specified in the actionscript.

OPTIONS
     -a FILE  Specifies the actionscript (FILE) to read the actions (see
	      below) from.

     -p FILE  Specifies the location (FILE) of the named pipe.	If the pipe
	      does not exist it will be created for the running time of
	      respond.	For a discription of the creation of a named pipe see:
	      mkfifo(1).  respond locks the directory of the pipe and pro‐
	      cesses relative paths in the actionscript as relative to this
	      directory.

ACTIONSCRIPT SNTAX
     Each line in actionscript (unless commented with '#') specifies a regular
     expression/command pair, sepperated by whitespace.	 As a result of this
     syntax whitespace in the expression or the command needs to be commented
     by either preceeding it with '\' or by placing it inside a quoted ('"')
     string.  You need to escape '"' and '\', even when they are within
     quotes.  In addition to this the '$'-character has special behaviour
     inside the command. When not escaped $n will translate to the matched
     subexpression n (if existing) and $0 will be replaced by the entire
     match.  Information on subexpressions as well as on the syntax used for
     the regular expressions is provided in a seperate manual (re_format(7)
     for the default regex library).

DIAGNOSTICS
     Although respond will detach from the terminal that calls it, it is as
     much a daemon as it has the "~d" suffix.  This means that it does, for
     one thing, not drop privileges.  This is really a feature and not a bug
     since it makes it possible to control multiple actionscripts for multiple
     users without the need of a configuration file.

TROUBLESHOOTING
     The most likely reason for respond to not start is a malformed action‐
     script.  When a read error is reported be sure to triple check the syntax
     used in your actionscript.	 In some cases too long lines in the action‐
     script can also trigger a read error.

     A sudden dead of respond will probably be caused by a failure reading the
     named pipe. Normally though, respond quits when it receives a SIGINT or
     SIGTERM signall from kill(1).

POSIX Compatible		 July 30, 2007		      POSIX Compatible
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net