| View previous topic :: View next topic |
| Author |
Message |
zash
Joined: 17 Aug 2008 Posts: 2
|
Posted: Sun Aug 17, 2008 10:23 pm Post subject: send email notification when source drops |
|
|
is there a way to get an email notification when the source drops?
It happens to me at least once a week that a source from a 3rd world country goes offline (long poweroutage that drains the UPS, ISP down, etc)
Thanks |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Aug 17, 2008 11:52 pm Post subject: |
|
|
Use on-disconnect or auth url option mount_end to run a script which will do the email notification.
karl. |
|
| Back to top |
|
 |
zash
Joined: 17 Aug 2008 Posts: 2
|
Posted: Mon Aug 18, 2008 2:53 am Post subject: |
|
|
| Thank you Karl. <on-disconnect> is a great feature. |
|
| Back to top |
|
 |
cookiesunshinex
Joined: 27 Dec 2008 Posts: 18
|
Posted: Sat Dec 27, 2008 8:25 pm Post subject: |
|
|
Does anybody have an example of one of these scripts that generates an email to a specified email address? I'm using qmail on Centos 4.7 if that makes any difference.
For example, the help documentation gives this as an example:
<on-connect>/home/icecast/bin/source-start</on-connect>
so what would be in the /home/icecast/bin/source-start file? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sat Dec 27, 2008 8:42 pm Post subject: |
|
|
it could be as simple as
| Code: |
#!/bin/sh
echo "stream $1 has just started" | mail -s "$1 started" account@addr.org
|
As you can see, not a really difficult thing to understand
karl. |
|
| Back to top |
|
 |
|