Hi all, I'm trying to use daemontools to manage the icecast server. I've got it installed and working (with qmail) However it wont work with icecast. My run file has the contents: ------------------------------- #!/bin/sh exec setuidgid icecast /usr/local/bin/icecast -c /usr/local/etc/icecast.xml ------------------------ I have also tried it using icecasts built in user switching abilities, but makes no difference. What is happening is that daemontools is trying to start it and failing, and as it should be, trying again in and endless loop. Has anyone done this before? Or possibly know why it cannot be done? Cheers Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20060707/f804db1b/attachment.htm
Hi Rob, I am using daemontools to keep icecast in the air. I think your script should work just fine. Is there anything in the error.log? Does icecast work when you start it from the command line? One issue I've found is that when a previous instance has crashed but some of the ports on which it listens have not been released yet because of a high load on the machine, then the new instance may not be able to starting listening on those ports. That's why in my daemontools 'run' script I use a loop around 'nc' (or netcat) to check that the previous icecast instance is no longer listening on it's ports. A simple solution would be to just sleep for a couple of seconds, but I was interested in restarting icecast as fast as possible. Regards, KJ p.s. Below is my run script, I also set some ulimits to get core dumps if icecast crashes (ulimit -c) and to be able to open more than the default 1024 connections (ulimit -n). Messages sent with /usr/bin/logger end up in /var/log/messages. #!/bin/sh # # log some info # [ -x /usr/bin/logger ] && /usr/bin/logger "starting icecast ... " # # set appropriate ulimits # ulimit -c unlimited ulimit -n 32768 if [ -x /usr/bin/logger ]; then ulimit -a | /usr/bin/logger fi # # wait for previous instance to stop # it has stopped when we can no longer connect to 127.0.0.1:8000 # $? == 0 means we can still connect to old instance # if [ -x /usr/bin/nc ]; then /usr/bin/nc -z 127.0.0.1 8000 while [ $? -eq 0 ]; do sleep 1 logger "still waiting for icecast to finish ..." /usr/bin/nc -z 127.0.0.1 8000 done fi # # start icecast # exec /opt/icecast/bin/icecast -c /opt/icecast/etc/icecast.xml Rob McDonald schreef:> > > > > > Hi all, > > > > I'm trying to use daemontools to manage the icecast server. > > > > I've got it installed and working (with qmail) > > > > However it wont work with icecast. > > > > My run file has the contents: > > ------------------------------- > > #!/bin/sh > > > > exec setuidgid icecast /usr/local/bin/icecast -c > /usr/local/etc/icecast.xml > > ------------------------ > > I have also tried it using icecasts built in user switching abilities, > but makes no difference. > > > > What is happening is that daemontools is trying to start it and > failing, and as it should be, trying again in and endless loop. > > > > Has anyone done this before? Or possibly know why it cannot be done? > > > > > > Cheers > > > > Rob > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Icecast mailing list > Icecast@xiph.org > http://lists.xiph.org/mailman/listinfo/icecast > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.9.9/382 - Release Date: 4-7-2006 >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20060707/3895695b/attachment.html
Hello all, Is there a way to have icecast2 create an xsl file for the files in the archive directory? I had to move the webserver to a different server than icecast is running on. Before I had PHP generate a dynamic page with links to the files in the archive directory but since PHP can't read the physical directory anymore, I would like to have PHP read and parse an xsl file which will be on the remote server with icecast on it. (Just as is possible with the file status.xsl for example.) Is it a good idea and a possibility to implement this in icecast2, or are there any other ways already to do this and solve the problem? Thanks, Frank Keijzers
Thomas B. Ruecker
2006-Jul-09 05:52 UTC
[Icecast] dynamic xsl generation for archive directory
paranoid wrote:> > Hello all, > > Is there a way to have icecast2 create an xsl file for the files in > the archive directory? > > I had to move the webserver to a different server than icecast is > running on. Before I had PHP generate a dynamic page with links to the > files in the archive directory but since PHP can't read the physical > directory anymore, I would like to have PHP read and parse an xsl file > which will be on the remote server with icecast on it. (Just as is > possible with the file status.xsl for example.) > > Is it a good idea and a possibility to implement this in icecast2, or > are there any other ways already to do this and solve the problem?The needed data is not available in the /admin/stats.xml file. Hence I don't see an easy way to accomplish it using an xslt. You might want to try and run an php-script (any other scripting language will do too) from cron (doesn't need apache) and place it's output into an plain html file in the archive directory. Cheers Thomas