[Icecast] Alert Email

TheDarkener thedarkener at logicalnetworking.net
Wed Jul 24 23:19:51 UTC 2013


This is how I do it in <on-connect>, just reverse it for
<on-disconnect>, it works pretty well:

---
#!/bin/bash
#
THEDATE=$(date +%F-%H_%M)
SUBJECT="Stream $1 started"
EMAIL="myemail at mydomain.com"

rm /tmp/emailmessage.txt
EMAILMESSAGE="/tmp/emailmessage.txt"
echo "Stream $1 connected to us on $THEDATE." > $EMAILMESSAGE

# send an email using /bin/mail
/usr/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
---



Cheers,
Jordan


On 07/24/2013 03:27 PM, Winn Johnston wrote:
> It looks like those are bash scripts so try something like
>
> be sure your mail binary path is correct it may be somewhere else
> other then /bin
> echo "/bin/mail -s connecting someone at somewhere.com
> <mailto:someone at somewhere.com>" >  /home/icecast/bin/source-start
>
> chmod 775 /home/icecast/bin/source-start
>
> you may have a chown permissions issue too if the user that runs
> icecast can't see the  /home/icecast/bin/source-start
>
> do the same for the source-end script
>
> -winn
>
>
>
> On Wed, Jul 24, 2013 at 9:39 AM, Phil - w2lie <w2lie at w2lie.net
> <mailto:w2lie at w2lie.net>> wrote:
>
>     That would be possible if you call out a script in the connect or
>     disconnect actions.
>
>      
>
>     I'm told that Icecast pushes the mount point as a variable, but I
>     was unable to find any documentation.  Does Icecast push the mount
>     point to the on-connect and on-disconnect scripts as a variable?
>
>     From the online docs:
>
>         <mount>
>
>             <on-connect>/home/icecast/bin/source-start</on-connect>
>             <on-disconnect>/home/icecast/bin/source-end</on-disconnect>
>         </mount>
>
>      
>
>     ---
>     Phil / w2lie
>     http://www.w2lie.net
>
>     On 2013-07-24 12:33, Miguel s wrote:
>
>>     anyone knows if is possible to create an email alert to notify me
>>     when a mount point is connecting and disconnecting?
>>
>>     _______________________________________________
>>     Icecast mailing list
>>     Icecast at xiph.org <mailto:Icecast at xiph.org>
>>     http://lists.xiph.org/mailman/listinfo/icecast
>
>     _______________________________________________
>     Icecast mailing list
>     Icecast at xiph.org <mailto:Icecast at xiph.org>
>     http://lists.xiph.org/mailman/listinfo/icecast
>
>
>
>
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast

-- 
Jordan (PGP: 0xDA470FF8)




More information about the Icecast mailing list