<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
Hi Rob,<br>
<br>
I am using daemontools to keep icecast in the air.<br>
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?<br>
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.<br>
<br>
Regards,<br>
KJ<br>
<br>
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.<br>
<br>
#!/bin/sh<br>
<br>
#<br>
# log some info<br>
#<br>
[ -x /usr/bin/logger ] && /usr/bin/logger "starting icecast ...
"<br>
<br>
#<br>
# set appropriate ulimits<br>
#<br>
ulimit -c unlimited<br>
ulimit -n 32768<br>
if [ -x /usr/bin/logger ]; then<br>
ulimit -a | /usr/bin/logger<br>
fi<br>
<br>
#<br>
# wait for previous instance to stop<br>
# it has stopped when we can no longer connect to 127.0.0.1:8000<br>
# $? == 0 means we can still connect to old instance<br>
#<br>
if [ -x /usr/bin/nc ]; then<br>
/usr/bin/nc -z 127.0.0.1 8000<br>
while [ $? -eq 0 ]; do<br>
sleep 1<br>
logger "still waiting for icecast to finish ..."<br>
/usr/bin/nc -z 127.0.0.1 8000<br>
done<br>
fi<br>
<br>
#<br>
# start icecast<br>
#<br>
exec /opt/icecast/bin/icecast -c /opt/icecast/etc/icecast.xml<br>
<br>
<br>
<br>
Rob McDonald schreef:
<blockquote cite="mid005501c6a190$6e9b6c80$4948d882@313D104gmcc055"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
-->
</style>
<div class="Section1">
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-NZ">Hi all,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-NZ"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-NZ">I’m trying
to use daemontools to manage the
icecast server.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-NZ"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-NZ">I’ve got it
installed and working (with qmail)<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-NZ"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-NZ">However it
wont work with icecast.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-NZ"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-NZ">My run file
has the contents:<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size: 10pt; font-family: Arial;" lang="EN-NZ">-------------------------------<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ">#!/bin/sh<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ">exec setuidgid icecast
/usr/local/bin/icecast -c
/usr/local/etc/icecast.xml<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ">------------------------<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ">I have also tried it using
icecasts built in user
switching abilities, but makes no difference.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ">What is happening is that
daemontools is trying to
start it and failing, and as it should be, trying again in and endless
loop.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ">Has anyone done this before? Or
possibly know why it
cannot be done?<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ">Cheers<o:p></o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;" lang="EN-NZ">Rob<o:p></o:p></span></font></p>
<p class="MsoNormal" style=""><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font face="Times New Roman" size="3"><span
style="font-size: 12pt;"><o:p> </o:p></span></font></p>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Icecast mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Icecast@xiph.org">Icecast@xiph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.xiph.org/mailman/listinfo/icecast">http://lists.xiph.org/mailman/listinfo/icecast</a>
</pre>
<pre wrap="">
<hr size="4" width="90%">
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
</pre>
</blockquote>
</body>
</html>