openrc-discuss

Execute shell scripts on events

andi

Wed Jan 20 18:41:00 2010

Hi!

Is there the possibility to execute a user defined shellscript, when some events occur?

The idea is : i'd like to let my box speak out what's happening via speech-dispatcher and it's commandline tool "spd-say".

For example : when a daemon has startet, a script called "/lib64/rc/eventscripts/service-started.sh" is called with $svcname as $1.
The same should be done for "service-failed", "service-stopped" etc....

Now one could run `spd-say "$1 service failed to start"` via the script "/lib64/rc/eventscripts/service-failed.sh" and `spd-say "$1 service started"` via the script "/lib64/rc/eventscripts/service-started.sh" ....


Greatings,
Andreas Tanz

Follow-Ups:
Re: Execute shell scripts on eventsRoy Marples
Archive administrator: postmaster@marples.name