Thursday, August 28, 2014

changes to our icecast setup

Continuing my earlier post about changes while migrating, we made some changes to the icecast setup - using the on-connect tag to run our live begin and end scripts. There were some small hiccups while doing this - since the she-bang #!/bin/bash was not present on our scripts, they were not being executed. PB corrected this, and then giving the full path in the on-connect directive does the trick.

Also, instead of changing the alias of port 8020 to a different mount-point as earlier, we've now made the fallback-mount change in the mount-point telugustream during the live session.

(Our attempts to avoid the live begin and end scripts did not work. The fallback-mount directive for relay does not seem to work. So, if livemandirasia is a relay for livemandir, and livemandir does not have a fallback, then if asiastream falls back to livemandirasia, then if livemandir is not live, listeners get a 404 file not found. And if connect when live and live disconnects, listeners are kicked.)

In the web player at our website, the streams were linked to server1.radiosai.org:8000 etc - changed to stream.radiosai.org:8000 etc. and purged the cloudflare cache for those files. Other places have stream.radiosai.net, which is fine since it is a cname for stream.radiosai.org.

Then, PB found a nice way to make the icecast daemon start as our user (and not root) on reboot - the @reboot directive in crontab. So, now no manual intervention is required for starting the streams. Also, when done this way, the ulimit workaround we had to implement is automatically taken care of - the cron is run as root su'ed as our user.

No comments:

Post a Comment