[Icecast] Alert Email

Phil - w2lie w2lie at w2lie.net
Thu Aug 1 21:05:27 UTC 2013


After all the discussion last week, I finally decided to put my own 
connect / disconnect scripts in on my server, as well as make some 
changes to the house keeping.

I'm now running my icecast server under chown, and as a user (instead of 
nobody).    Chown and the user seem to be functioning fine.

But, for some reason, Icecast cannot find my connect & disconnect 
scripts, even though the exist.  They are .sh scripts and have 755 
permissions.   Running the scripts directly from shell work fine.   But 
Icecast will always spit out an error that it can't find the connect or 
disconnect script.   I've even put the scripts in the chown root, but no 
luck there either.

Can someone help me figure out why icecast can't find my scripts?

SSH:
root at xx [/home/<user>]# icecast -c /home/<user>/icecast/<config>.xml
Changed root successfully to "/home/<user>/icecast".
Changed groupid to 5##.
Changed userid to 5##.

error.log:

[2013-08-01  20:51:10] WARN main/main YP server handling has been disabled
[2013-08-01  20:51:16] EROR source/source_run_script Unable to run 
command connect.sh (No such file or directory)
[2013-08-01  20:51:21] EROR source/source_run_script Unable to run 
command disconnect (No such file or directory)



Thanks for the help

Phil

By The way, I've extended the bash file to include different e-mail 
addresses for different feeds.

#!/bin/bash
#
# W2LIE Icecast Connect / Disconnect Parameters File
# Use for notification system
#
# Rev .01
#
#

#Set the date and Time
date="$(date '+%B %d,%Y')"
time="$(date +%H%M)"


# Set the Connect and Disconnect Subject Lines
SUBJECT="Stream $1 connected"


# Set our Delivery E-mail Addresses per feed
if [[ $1 == "<feed a>" ]] || [[ $1 == "<feed b>" ]]; then
     email="email at address.tld email at address.tld"

elif [[ $1 == "<feed c>" ]]; then
     email="email at address.tld email at address.tld"

elif [[ $1 == "<feed d>" ]]; then
     email="email at address.tld email at address.tld"

elif [[ $1 == "<feed e>" ]]; then
     email="email at address.tld email at address.tld"

elif [[ $1 == "<feed f>" ]]; then
     email="email at address.tld email at address.tld email at address.tld"

elif [[ $1 == "<feed g>" ]]; then
     email="email at address.tld email at address.tld"

elif [[ $1 == "<feed h>" ]]; then
     email="email at address.tld email at address.tld"

elif [[ $1 == "<feed i>" ]] || [[ $1 == "<feed j>" ]]; then
     email="email at address.tld email at address.tld"

else email="email at address.tld"
fi

# Set the Connect and Disconnect Messages
echo -e "Hello,\nThis is an automatic notification from W2LIE.net.\nThe 
${1} Live Scanner Feed has connected to the server on ${date} at 
${time}hrs.\n\nThank you,\nPhil / w2lie" > 
/home/<user>/icecast/scripts/${1}_connect.txt

# send an email using /bin/mail
/bin/mail -s "${SUBJECT}" ${email} < 
/home/<user>/icecast/scripts/${1}_connect.txt

#EOF





More information about the Icecast mailing list