View Single Post

  #16  
Old 07-01-2008, 06:38 AM
Default Re: How to get an "alert" when a process dies

On Jun 29, 10:35 am, nicc777 wrote:
> Is there a way to trigger an event (like running a script) when a
> process dies? Perhaps even a script to restart a process if it detects
> that it's dead?


you want any kind of exit code? You may try logger tool...

ex:

updatedb || logger -t updatedb -- Process Terminated &

You will get a message at your log's (usualy /var/log/*) or you may
specify a socket to send packets to (see man logger). And you may also
change the logging priority (see man again).
Reply With Quote