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

FreeBSD Manual Pages

  
 
  

home | help
Jouke Witteveen
UNTITLED()			     LOCAL			    UNTITLED()

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 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
		processes  relative  paths  in the actionscript	as relative to
		this directory.

ACTIONSCRIPT SNTAX
       Each line in actionscript (unless commented with	'#') specifies a regu-
       lar 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	multi-
       ple 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 syn-
       tax used	in your	actionscript.  In some cases too long lines in the ac-
       tionscript 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			    RESPOND(1)

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

home | help