[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: trigger external program on some change



matthew sporleder wrote:
On 8/1/07, Emmanuel Dreyfus <manu@netbsd.org> wrote:
Hello

I'd need to trigger execution of an external shell script when some
particular change occur in the tree. Is there a simple way of doing that?

Of course, an overlay could do that. I saw no available overlay that
would have this capacity out of the box. The only way I see is building
a new overlay just for that, or use something such as slapo-auditlog
and feed it to an external filter (throug a pipe?). I wonder if there is a
simplier mechanism available.

Although I kind of think a custom overlay would be cleaner, you could try replicating to a dummy server (like localhost:<off port>) running back-shell or back-perl and simply trigger there.

An alternative could be to use the slapo-accesslog(5) to log write operations, and use slapd-perl(5) as the logging database, so that write operations can be easily intercepted by a scripting backend without the hassle of setting up a replica.


Note that I haven't tried it, although it __should__ work.

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it
---------------------------------------