Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
RESPOND(1)		FreeBSD	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 ac-
     tionscript	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 be-
	      low) 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 in-
     side the command. When not	escaped	$n will	translate to the matched sub-
     expression	n (if existing)	and $0 will be replaced	by the entire match.
     Information on subexpressions as well as on the syntax used for the regu-
     lar 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

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | ACTIONSCRIPT SNTAX | DIAGNOSTICS | TROUBLESHOOTING

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=respond&sektion=1&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help