• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Sheevaplug: Send Email when process is not running  (Read 4047 times)

Karma: 0
Posts: 3

View Profile
« on: June 23, 2011, 04:29:28 AM »

Hello everyone

what is the easiest way to make my plug send me an email when a process is dead? It would be enough if this would be checked every 5 minutes or so, but of course I donít want an email every 5 minutes if the process stays dead for some hours.

My idea is to monitor a sheevaplug running darkice to stream mp3 audio to a icecast server.

Greetz Milhouse

Sr. Member

Karma: 4
Posts: 443

View Profile WWW
« Reply #1 on: June 23, 2011, 05:32:23 PM »

Assuming you have mail setup to work...

Run a cron job everty 5 mins that:

Checks the process is running. 
If not:
   if there is no NO_PROCESS file, send a mail
   touch a NO_PROCESS file
if it is there
   delete any NO_PROCESS file.

Pages: [1]
Jump to: